Base64 encode and decode
Encode text (accents and emoji included) or any file to Base64, or decode a Base64 string to read it or download the original file. Nothing is sent to a server, so it is safe for tokens or internal data.
đź”’ Your files never leave your device
How to use it
- Choose “Encode” or “Decode”.
- Type or paste the text, or choose a file to encode (a data URL for HTML or CSS is generated too).
- Tick “URL-safe” if you will use it in a URL or a JWT (it swaps + and / for - and _, with no =).
- Copy the result or, when decoding, download the original file.
Example
Text with accents and an emoji
“¿Qué tal? 👍” in Base64 is wr9RdcOpIHRhbD8g8J+RjQ==. The text is encoded as UTF-8 first, so accents and emoji decode the same on any system.
How it works
It follows RFC 4648: every 3 bytes become 4 characters from the A–Z, a–z, 0–9, + and / alphabet, with = padding at the end.
The URL-safe variant uses - and _ instead of + and / and drops the padding. Decoding accepts both variants, with or without padding, with line breaks and with a data:…;base64, prefix.
If the decoded content is not valid UTF-8 text, it is treated as a file and its type is recognised (PNG, JPG, GIF, WebP, PDF or ZIP) so it downloads with the right extension.
Limitations
- Base64 is not encryption: anyone can decode it. Do not use it to protect information.
- The result is about 33% larger than the original.
- Very large files (tens of MB) may be slow on phones.
FAQ
Is Base64 encryption?
No. It is a way of representing binary data with text characters, and it decodes without any key.
How do I convert an image to Base64?
Choose the image under “Or choose a file to encode”: you get a data URL (data:image/png;base64,…) ready for HTML or CSS.
Is my data sent anywhere?
No. The conversion runs in your browser; you can check by going offline.