Base64 encoder and decoder
Turn text, images or any file into Base64, or turn Base64 back into readable text or a downloadable file. Hindi and emoji are encoded correctly as UTF-8. Everything runs in your browser.
Everything runs on your device. Nothing you add or type is sent to any server.
How to use it
- 01
Choose what you want to do: Text to Base64, Base64 to text, File to Base64 or Base64 to file.
- 02
Type or paste your text or Base64, or drop a file up to 10 MB. The result appears straight away.
- 03
For a file, keep Data URL ticked if you want a value you can paste into HTML or CSS, or untick it to get plain Base64.
- 04
Copy the result or download it. When decoding to a file, the tool detects the file type and suggests the right extension.
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. It is used to put images inside HTML or CSS, to send attachments in email, to carry binary data in JSON, and in tokens such as JWTs. It is an encoding, not encryption: anyone can decode it, so never treat Base64 as a way to hide a password.
Every 3 bytes become 4 characters, so Base64 text is about one third larger than the original. The tool shows both sizes so you can decide whether embedding a file is worth it.
Correct UTF-8 for Hindi and emoji
Text is converted to UTF-8 bytes before encoding. So नमस्ते or an emoji gives the same Base64 as other UTF-8 based tools, and decodes back exactly; we test this against Node.js on 1,000 random strings and 2,000 random byte arrays. If decoded bytes are not valid UTF-8 text, the tool says so instead of showing garbled characters, and offers to save them as a file.
URL-safe Base64 and data URLs
The URL-safe option uses minus and underscore instead of plus and slash and leaves out the = padding, as used in web addresses and JWTs. When decoding, both alphabets are accepted, padding is optional, and spaces and line breaks are ignored. You can also paste a complete data URL; the part before the comma is read for the file type.
Clear errors
If the input contains a character that is not Base64, you see which character and its position. A wrong length or misplaced = padding is also reported, so you know the text was cut or changed while copying.
Frequently asked questions
Are my files or text uploaded?
No. Encoding and decoding run on your device. Nothing is sent to a server or stored.
How is the file type detected?
From the first bytes of the decoded data, for example PNG, JPEG, PDF, ZIP, Word or MP4. If the type is unknown, the file is saved as .bin and you can rename it.
Why is there a 10 MB file limit?
Base64 of a large file is a very long piece of text, which slows the browser down. For big files, keep them as files.