Convert an image to Base64 (and back)
Turn an image into Base64 text you can paste straight into HTML, CSS or JSON, or paste Base64 to see and download the image inside it.
Drop an image hereAdd an image
JPG, PNG, WebP, GIF, AVIF, BMP or SVG, up to 80 MB. You can also paste an image.
This is a large image. Base64 makes files about a third bigger and can’t be cached separately, so for anything over a few kilobytes, a normal image file is usually faster. Compress it first if you still want to inline it.
Converted on your device. Nothing you drop or paste is uploaded.
How it works
- Your browser reads the file’s bytes and checks what kind of image it is.
- The bytes are written out as Base64 text, with the right data URI prefix for the image type.
- For decoding, the text is turned back into bytes and shown as an image you can download.
Supported formats
- Opens
- JPG, PNG, WebP, GIF, AVIF, BMP and SVG. For decoding: a data URI, CSS url(…), an <img> tag or bare Base64.
- Saves
- Text to copy or download as .txt, or the decoded image in its own format
- Limits
- Files up to 80 MB.
- The image bytes are kept exactly as they are: nothing is re-compressed, and metadata inside the file is kept too.
- Base64 is about a third larger than the image file, so it suits small icons and graphics best.
Your image stays on your device
This tool runs entirely in your browser. The image is never uploaded, so there is nothing for us to store, see or delete.
To check, open your browser’s developer tools, switch to the Network tab and use the tool: you will not see your image being sent anywhere.
Related tools
Questions
Are my images uploaded anywhere?
No. The image is read and processed by your own browser. Nothing is sent to our servers, so there is no copy of your image anywhere but your own device.
When should I use a Base64 image?
For small icons and graphics you want inside an HTML email, a CSS file or JSON, where a separate file is awkward. For large photos, a normal image file loads faster.
Does the Base64 include the photo’s metadata?
Yes: it’s an exact copy of the file. Remove metadata with the EXIF Remover first if you don’t want to share it.