Image to Base64
Convert images to Base64 data URLs and back.
or click to browse — JPG, PNG, WebP, GIF
Base64 output
Decoded image
How to use this tool
Choose direction
Pick Image → Base64 to encode, or Base64 → Image to decode.
Provide input
Drop an image, or paste a Base64 string into the box.
Copy or download
Copy the encoded string, or download the decoded image.
Frequently asked questions
What is Base64 encoding?
Base64 turns binary image data into a long text string, so the image can be embedded directly in HTML, CSS or JSON as a data: URL — no separate image file needed.
Why is the Base64 string so long?
Base64 encoding makes data about 33% larger than the original file. It's best for small images like icons and logos; large photos are better kept as files.
Can I decode a Base64 string without the data: prefix?
Yes — paste the raw Base64 or the full data URL; the tool detects the format automatically.
Are my images uploaded anywhere?
No. Encoding and decoding happen entirely in your browser with the FileReader API. Your files never leave your device.
What image formats are supported?
Anything your browser can display: JPG, PNG, WebP, GIF, BMP and SVG.
