Image to Base64 encoder and decoder
Drop an image in to get a data URI you can paste straight into CSS, HTML or a JSON payload — with the MIME type and encoded size shown so you can see what it costs. Paste a Base64 string the other way and it renders as a downloadable image.
Encoding reads the file into memory and converts it with the FileReader API; decoding validates the string and builds a data URI the browser can display. Both directions show the byte size, which is roughly 33 percent larger than the original file after encoding.
Runs entirely in this tab. Nothing you paste is uploaded, logged or stored — close the page and it is gone.
Questions about this tool
Why is the encoded string bigger than my file?
Base64 uses four characters for every three bytes, so the result is about a third larger. That is also why large images should be referenced by URL rather than inlined.
Can it decode a data URI with the header attached?
Yes. A full 'data:image/png;base64,...' string is accepted as well as the bare Base64 payload, and the declared MIME type is used when present.
Is my image uploaded anywhere?
No. Reading and encoding happen in the page with the FileReader API. Nothing is sent to a server, which is also why there is no file size limit beyond your browser's memory.
AI alternatives from the directory
Browse coding tools →This utility handles the job by hand. These do it with a model — worth a look when the task outgrows copy and paste.
The AI-first code editor
Built on VS Code, Cursor offers codebase-aware chat, multi-file edits and fast autocomplete for real engineering work.
Generate UI from a prompt
Describe a component or page and v0 outputs React + Tailwind code you can iterate on and deploy instantly.