Advertisement
Guide
About the Base64 Encoder / Decoder
Base64 is a way of representing binary data — bytes — using only 64 printable ASCII characters (A–Z, a–z, 0–9, and + and /). It exists because many systems were designed to handle text, not raw bytes: email bodies, JSON fields, data URIs, HTTP headers, and XML all expect text. Encoding binary data as Base64 lets you move it safely through those text-only channels without it being corrupted.
This encoder and decoder converts in both directions, handles Unicode text correctly (via UTF-8), and can Base64-encode entire files by drag-and-drop. Everything happens locally in your browser, so even sensitive data never leaves your device.
Standard vs. URL-safe Base64
Standard Base64 uses + and /, which have special meaning in URLs and filenames. URL-safe Base64 swaps them for - and _ and usually drops the =padding, so the result can be dropped straight into a query string, path segment, or JWT without further escaping. Toggle the mode to match whatever system you're feeding.
Is Base64 encryption?
No — this is a common misconception. Base64 is encoding, not encryption. It provides zero secrecy: anyone can decode it instantly (as this tool demonstrates). Never use Base64 to “hide” passwords or secrets. If you need actual confidentiality, use encryption such as AES instead.
How to use it
- 1Choose Encode or Decode.
- 2Paste your text into the input, or drag-and-drop a file to encode it.
- 3Pick standard or URL-safe output if you need the URL-safe alphabet.
- 4Copy the result — or download it when decoding back to a file.
Frequently asked questions
Why is my Base64 output about a third longer than the input?
Base64 represents every 3 bytes of input as 4 characters of output, so encoded data is roughly 33% larger than the original. That size overhead is the trade-off for being text-safe.
What do the "=" signs at the end mean?
They are padding. Base64 works in blocks of 4 characters; when the input length is not a multiple of 3 bytes, one or two "=" characters are added so the final block is complete. URL-safe mode often omits them.
Does this tool support Unicode and emoji?
Yes. Text is first converted to UTF-8 bytes before encoding, so accented characters, non-Latin scripts, and emoji all round-trip correctly.
Can I encode images or PDFs?
Yes. Drag-and-drop any file to get its Base64 representation, which is handy for inlining small assets as data URIs. For images specifically, see the dedicated Image to Base64 tool.
Is my data uploaded anywhere?
No. All encoding and decoding runs in JavaScript in your browser. Nothing you paste or drop is sent to a server.
