Base64 Encoder & Decoder
Text and Base64 in both directions without mangling non-Latin characters, plus a file-to-DataURL helper.
Convert a file to Base64
Files under 100 KB are advisable; anything larger produces an unmanageable string.
How to use
- Paste the text —— Put the content into the box. Non-Latin characters are treated as UTF-8 automatically.
- Pick a direction —— "Encode to Base64" turns text into the familiar block of characters; "Decode Base64" restores the original.
- Convert a file —— The lower panel turns a small file into a DataURL you can paste straight into a CSS url().
About Base64 Encoder & Decoder
Base64 represents binary data using 64 printable characters, which makes the output about 33% larger than the original. That overhead buys you something valuable: binary data can travel through channels that only accept text. It is most often used to inline small icons directly into CSS or HTML, saving a network request.
The important caution: Base64 is an encoding, not encryption. Anyone holding the string can turn it back into the original in one step. Never use it to protect a password, a key or anything confidential.
This tool handles text as UTF-8 throughout, so accented letters and CJK characters survive the round trip. When you are interoperating with another system, confirm that it also assumes UTF-8 — that mismatch is the usual cause of garbled output.
FAQ
Why does decoded text come out garbled?
Because the original was not encoded as UTF-8 before being Base64-encoded. This tool assumes UTF-8 in both directions; check the same assumption at the other end of the pipeline.
Can I use Base64 as encryption?
No. It only changes the representation — anyone can reverse it instantly. Use a real cipher such as AES if confidentiality matters.
Is there a size limit for file conversion?
Not technically, but pages handle inline data comfortably up to about 100 KB. Beyond that you should serve the file over HTTP instead of embedding it.