Base64 Encoder and Decoder
Free Base64 encoder and decoder for text and files. Encode or decode UTF-8 safely, convert text to a data URI, and encode binary files without breaking on non-Latin characters.
Free, no sign-upRuns in your browserNothing uploaded
Encoded as UTF-8
Multi-byte characters are encoded correctly, so accented letters, CJK text and emoji survive the round trip.
Output, read only.
Data URI: data:text/plain;base64,R3LDvMOfZSBhdXMgTcO8bmNoZW4g4oCUIGNhZsOpIOKYlSDml6XmnKzoqp4=
- input chars
- 30
- output chars
- 60
- encoding overhead
- +36%
Base64 is an encoding, not encryption. Anyone with the string can decode it in one step, so never use it to protect a password, token or API key.
Base64 turns binary data into text using a 64-character alphabet, so it can travel through places built for text: email bodies, JSON fields, URLs and query parameters. This tool encodes and decodes in both directions, for plain text and for whole binary files.
The detail that breaks most online Base64 tools is UTF-8. JavaScript's built-in btoa and atob operate on Latin-1, one character per byte, so any accented letter, emoji or non-Latin script throws an error or comes back as mojibake. This tool encodes text as UTF-8 first and decodes it back to UTF-8, so 'café', 'Grüße' and Japanese text all round-trip correctly.
For files, it produces a data URI you can paste straight into CSS or an HTML attribute, and it will also decode a data URI back into a downloadable file. Base64 is an encoding, not encryption: anyone with the string can decode it, so never use it to hide a secret or an API key.
Base64 Encoder & Decoder features
How to use the Base64 Encoder & Decoder
Choose a direction
Select Text to Base64 or Base64 to text. For files, switch to the file tab and drop in anything - images, PDFs, archives.
Paste or drop your input
Text goes straight into the editor and converts as you type. Files are read locally in the browser; nothing is uploaded.
Check the output
Output size, the 33% encoding overhead and a checksum-style character count are shown. Padding and line wrapping can be toggled for the formats that need it.
Copy or download
Copy the encoded string, or use the data URI button to get a ready-to-paste background-image value. For files you can download the decoded result directly.
Frequently asked questions
Is Base64 encryption?
Why do emoji and accented characters break other Base64 tools?
Why does my Base64 output end in one or two equals signs?
When should I use Base64?
What is base64url?
Does a Base64 data URI work for images?
Related tools
Every tool, in one place
ToolForge has base64 encoder & decoder plus a growing set of image, colour and developer tools. All of them run locally in your browser, free and without an account.
Browse all tools