Base64 encode and decode
Turn text into Base64 and back, including emoji and accented letters. You can also turn a file into a Base64 data URL.
FreeNo sign-upRuns on your device
How to use it
- Choose Text to Base64 or Base64 to text.
- Paste your text or Base64 into the box. The result appears straight away.
- Tick URL-safe if the Base64 is going in a web address or a token.
- To encode a file, drop it in the file box and copy the data URL or the Base64 alone.
What Base64 is for
Base64 writes any data using only 64 safe characters: A to Z, a to z, 0 to 9, plus and slash. That lets binary data, like an image or a key, travel through systems built for plain text, such as email, JSON and HTML. It is not encryption. Anyone can decode it, so never use it to hide a password.
Base64 makes data about a third bigger, because every 3 bytes become 4 characters. An = sign at the end pads the last group.
UTF-8 and URL-safe Base64
The browser's built-in btoa function fails on emoji and most non-English letters. This tool first turns your text into UTF-8 bytes, the way servers and other languages do, so the result matches what Python, Node.js or the base64 command would give you.
URL-safe Base64 swaps + for - and / for _, and drops the = padding, so the result can go in a web address without being changed. It is used in JWT tokens and many APIs. The decoder accepts both kinds, with or without padding, and ignores line breaks.
Files and data URLs
A data URL puts a whole file inside a link, like data:image/png;base64,... You can paste it straight into an img tag or a CSS background. It's useful for small icons and test files. For large images it is usually slower than a normal file, because the browser can't cache it separately.
If Base64 decodes to something that isn't readable text, like an image, you can download the decoded bytes as a file.
Privacy
Encoding and decoding happen in your browser. Your text and files are never uploaded.




