Base64 Encoder/Decoder
Base64 turns arbitrary binary data into plain ASCII text, so it can be safely embedded in places that only accept text — JSON payloads, URLs, CSS/HTML, email attachments. This tool encodes or decodes text instantly, and can also turn any file (image, font, PDF...) into a ready-to-use Base64 data URI, all in your browser.
How to use
- Type or paste text, choose Encode or Decode, and copy the result.
- Or, in the file section, pick any file to get its Base64 data URI.
- Data URIs can be pasted directly into CSS (background-image), HTML (<img src>), or JSON.
- Nothing is uploaded — all conversion happens locally in your browser.
FAQ
Is Base64 encryption?
No — Base64 is not encryption or compression, just a reversible text encoding. Anyone can decode it back to the original data; don't use it to hide sensitive information.
Why does encoded text end with = or ==?
Those are padding characters. Base64 groups input into 3-byte chunks encoded as 4 characters — padding is added when the input length isn't a multiple of 3.
What is a "data URI" and when should I use one?
A data URI embeds a file's content directly into a URL (e.g. `data:image/png;base64,...`), avoiding an extra HTTP request. Best for small, frequently-used assets like icons — large files should still be linked normally, since inlining bloats the surrounding file.
Are large files sent anywhere?
No — the file is read and converted entirely in your browser via the FileReader API. Nothing is uploaded to a server.