Image Converter / Converters / Image to Base64 converter
Image to Base64 converter
Inline a small image as text: get a data URI for CSS or HTML, or paste one back to recover the picture.
Pick a file to start.
The image preview appears here.
Base64 encoding turns binary image data into text so it can live inside a stylesheet, an HTML file or a JSON payload without a separate request. It costs about a third more bytes than the binary file, which is why it suits icons, logos and email templates rather than photo galleries.
How to use it
Step 1. Drop an image, or paste a Base64 string to decode
Step 2. Pick the output format (PNG keeps transparency)
Step 3. Copy the data URI, or download the decoded picture
Questions
- Is the image uploaded anywhere?
- No. Encoding and decoding happen in your browser; nothing is sent to a server.
- Why is the Base64 text bigger than the file?
- Base64 stores 3 bytes as 4 characters, so the text is about 33% larger. Use it for small images only.
- Which format should I choose?
- PNG for icons and anything with transparency, JPG or WebP for photos where smaller text matters more than perfect pixels.