Base64 Image
Convert images to Base64 data URLs and back, entirely offline.
Image to data URL
Data URL / Base64 to image
Conversion runs in your browser. Files never leave your device.
How to use it
- To encode: choose an image up to 5MB. The data URL appears immediately.
- Toggle Strip the data: prefix if you need the raw Base64 payload only.
- Click Copy to grab the output.
- To decode: paste a data URL or raw Base64 into the second panel and click Preview image.
- The decoded dimensions and approximate size appear under the preview.
Common use cases
- Inlining small icons - embed a tiny icon directly in CSS with
background-image: url(data:...)and save a request. - Self-contained HTML files - ship a single file with images embedded for email templates or offline docs.
- Debugging payloads - paste a Base64 blob from an API response and see the actual picture.
Why it stays private
Encoding uses FileReader and decoding uses an img element, both inside your browser tab. Images and Base64 strings never leave your device.
FAQ
Q: Why does the Base64 output look bigger than my file? A: Base64 encodes every 3 bytes into 4 characters, so text output is roughly a third larger than the binary file. That is the cost of representing bytes as text.
Q: Are huge images suitable for inlining? A: Data URLs skip caching and bloat the host document, so inlining pays off for icons and small graphics under a few kilobytes. Full photos belong in separate files.
Q: The preview says the Base64 is valid but shows nothing. Why? A: The string may decode to a format the browser cannot render in an img element, or to a non-image file. Check that the payload really is image data.
Your data stays on this device
Base64 Image runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.