Encode
Image to Base64
Turn an image into a data URL you can paste into HTML, CSS, or JSON — or decode one back to a file.
This file can contain faces, documents, GPS tags, or screenshots. Processing happens in your browser and ImageToolMage does not upload the image to our server. Your screen, clipboard, and extensions can still leak it.
Base64 is encoding, not encryption. Do not treat the string as a way to hide a photo.
Choose one file with the file picker, or drop it on the box. This is not drag-only.
Encode a file or paste a data URL. Encoding is not encryption.
How it works
Encoding uses the file bytes and a MIME type from magic bytes or the file type. Decoding accepts a data URL or raw Base64.
Input and output
Input is a file or a string. Output is a string or a reconstructed file. SVG is accepted as text when it is a real image/svg+xml payload.
Examples
CSS background
Small icons can be inlined as data:image/png;base64,…
Decode
Paste a data URL to preview it and download the reconstructed file.
How to use this tool
- Choose an image to encode, or paste a data URL / Base64 string to decode.
- Copy the raw Base64, data URL, or HTML snippet.
- Or download the decoded file.
Limitations
- Base64 is about one-third larger than the original bytes.
- Very large strings can freeze the tab. A size guard rejects extreme input.
- This is not a text-only Base64 workbench for tokens or documents.
Questions
Is Base64 encryption?
No. Anyone with the string can reconstruct the file. It is encoding, not protection.
Does this convert JPG to PNG?
No. It encodes or decodes the bytes you already have.
Related tools
Inspect
Image Inspector
See pixel size, file size, format, and common JPEG camera or GPS tags when they exist.
File size
Image Compressor
Re-encode an image to reduce bytes. You see the new size before you download.
Metadata
Remove Image Metadata
Strip common embedded tags from a JPEG or PNG. Pixel bytes stay intact when the container walk succeeds.