Base64 Encoder
Encode text to Base64 or decode Base64 back to text. Any language and emoji are handled correctly as UTF-8, with URL-safe output and file to Base64 conversion.
File → Base64
Options
How to use
When it helps
Base64 represents binary data using only 64 characters: letters, digits, + and /. It is used wherever only text can travel, such as email attachments, JWT tokens, Data URI images and HTTP Basic auth headers.
The browser's built-in btoa function throws an error on characters outside Latin-1, such as accented letters, Asian scripts or emoji. This tool converts text to UTF-8 bytes first, so it encodes and decodes any language correctly. It can also decode legacy Korean EUC-KR data.
If the value goes into a URL or a file name, turn on the URL-safe option. It uses - and _ instead of + and / so nothing breaks in the address. Keep in mind that Base64 is not encryption, and anyone can decode it.
FAQ
Is Base64 encryption?
No. It is just an encoding that anyone can reverse instantly. Never use it to hide passwords or secrets.
Why does encoding make the data larger?
Every 3 bytes become 4 characters, so the size grows by about 33%. Large images as Data URIs make pages heavy, so use them only for small icons.
The decoded result is garbled.
The original data may be a binary file such as an image or archive rather than text. It may also use a different character encoding, so try another option.
Can I decode a JWT?
Paste the middle part of the token (between the dots) and decode it to see the contents. URL-safe characters and missing padding are handled automatically.
Are my files uploaded?
No. File conversion also happens inside your browser.