Private by design — runs entirely in your browser
Base64 encoder & decoder
Convert text, files and images to and from Base64 instantly. UTF-8 safe, URL-safe aware, and your data never leaves your device.
Text (UTF-8)
Base64
More tools
Text ↔ Base64
Encode or decode text with full UTF-8 support, URL-safe output and line wrapping.
OpenFile → Base64
Drop any file and get its Base64 string or a ready-made data URI.
OpenBase64 → File
Paste Base64, auto-detect the file type, preview it and download it.
OpenImage → <img> / CSS
Turn an image into an HTML <img> tag, CSS background or Markdown snippet.
OpenHow Base64 works
Base64 turns any binary data into plain text using just 64 safe characters: A–Z, a–z, 0–9, + and /, with = for padding. Because 26 = 64, each character carries exactly 6 bits, so every 3 bytes (24 bits) of input become 4 characters of output.
1Text → bytes (UTF-8) → 8-bit binary
2Regroup the bits into 6-bit chunks → numbers 0–63 → characters
3Result
QUJD
The Base64 alphabet (index → character)
Decoding is the same process in reverse: each character is looked up to get its 6-bit value, the bits are joined back together and split into 8-bit bytes, and any padding is discarded.
Frequently asked questions
Is my data sent to a server?+
No. All encoding and decoding happens in JavaScript inside your browser. Nothing you type, paste or drop is uploaded — you can even use the site offline once it has loaded.
Does it handle emoji and non-English text?+
Yes. Text is encoded as UTF-8 before conversion, so emoji, accents and scripts like 中文 or العربية round-trip correctly. (Plain btoa() in JavaScript fails on these.)
What is URL-safe Base64?+
A variant defined in RFC 4648 §5 that uses - and _ instead of + and /, so the result can be placed in URLs and file names without escaping. It's used by JWTs and many web APIs. The decoder here accepts both forms automatically.
Is Base64 encryption?+
No. Base64 is an encoding, not encryption — anyone can decode it. Never use it to hide passwords or secrets.
Why is the Base64 output bigger than the input?+
Every 3 bytes of input become 4 characters of output, so Base64 is about 33% larger (plus line breaks, if you wrap it).