Image to Base64
Free online image to Base64 converter: turn a file or pasted data URL into Base64, optionally strip the data: prefix or wrap at 76 characters, with image type and original byte size shown.
How to Use
- Pick or paste an image
Upload with 'Choose an image file', or paste a data:image/... URL into the input.
- Choose the output shape
Keep the default Data URL for CSS/Markdown embedding, or tick 'plain Base64' for API payloads.
- Copy the result
Check the type and character count, then copy. Remember inlining large images adds about 33% overhead.
FAQ
Data URL vs plain Base64?
A Data URL looks like data:image/png;base64,iVBOR... and carries the MIME type, so it works directly in an img src. Plain Base64 is only the part after the comma, common in API payloads.
Why wrap at 76 characters?
That is the classic MIME line width required by some email clients and legacy systems. Modern HTML and JSON usually need no wrapping.
Is there a size limit?
Bounded by browser memory: hundreds of KB up to a few MB work, but huge images will lag. Keep large images as file references.
Can I turn the Base64 back into an image?
Yes. Paste it into an img src with the data:image/png;base64, prefix, or decode it back to binary with a decoder.