Encode text or files to Base64, or decode Base64 back to text β with full Unicode support.
Encode a file
π This tool runs entirely in your browser. Nothing you enter or upload is sent to our servers.
How to use the Base64 Encode / Decode
- Type or paste text and click Encode, or paste a Base64 string and click Decode.
- To encode a file (image, PDFβ¦), drop it on the file area β you’ll get the raw Base64 and a ready-to-use data URI.
- Copy the result with one click.
About this tool
Base64 represents binary data using 64 printable ASCII characters so it can travel safely through systems designed for text: email attachments, JSON payloads, data URIs in CSS and HTML, and HTTP basic-auth headers. It’s an encoding, not encryption β anyone can decode it.
Text is encoded as UTF-8 first, so emoji and non-Latin scripts round-trip correctly (a common bug with naΓ―ve btoa() usage).
Frequently asked questions
Why is Base64 output longer than the input?
Every 3 bytes become 4 characters, so encoded data is about 33% larger. Padding with = at the end fills out the last group.
What is URL-safe Base64?
A variant that replaces + and / with – and _ so the string can be used in URLs and filenames without escaping. Tick the option to use it.
Can I decode Base64 to a file?
Yes β after decoding, use the Download button to save the raw bytes as a file.