Base64 Encoder – Encode & Decode Text Online
Encode any text to Base64, or paste a Base64 string and decode it back to text. Full UTF-8 support, URL-safe Base64, and optional MIME line wrapping. Free, private, and runs entirely in your browser.
Input
Text → Base64Result
Waiting for inputWhat is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = used for padding. It was designed so that binary data could travel safely through text-only channels like email, JSON, XML, and URLs, where certain byte values might be interpreted as control characters or break the format.
Each Base64 character encodes exactly 6 bits of data. Four Base64 characters encode 3 bytes (24 bits) of the original input, which means the encoded output is always about 33% larger than the source. That overhead is the price of encoding arbitrary binary data as safe ASCII text.
Everything runs locally in your browser. The text you enter never leaves your device, there's no signup, and there are no usage limits.
Base64 is encoding, not encryption
This is the single most common misconception about Base64. Base64 is not encryption. It's a reversible encoding with no key: anyone can take a Base64 string and decode it back to its original form without any secret. If you see something that looks like Base64 and you need the plaintext, this tool — or any of hundreds of others — will do it instantly.
Use Base64 to safely transport binary data through text channels, or to embed small images directly in HTML and CSS as data URIs. Do not use it to protect passwords, tokens, or personal information — that requires real encryption like AES or ChaCha20, ideally over TLS in transit.
URL-safe Base64 and MIME line wrapping
Standard Base64 uses + and /, which have special meanings in URLs and query strings. RFC 4648 §5 defines a URL-safe variant (also called Base64url) that replaces + with - and / with _, and typically strips the trailing = padding. This variant is used in JWTs, OAuth tokens, and anywhere a Base64 string has to sit inside a URL without escaping.
MIME line wrapping inserts a newline every 76 characters in the output, matching the format defined in RFC 2045 for email attachments and PEM certificates. Enable it if you're producing Base64 for those contexts; leave it off for compact storage or transmission over JSON.
| Variant | Alphabet | Padding | Typical use |
|---|---|---|---|
| Standard | A–Z a–z 0–9 + / | Yes (=) | Email, JSON, general data transport |
| URL-safe | A–Z a–z 0–9 - _ | Usually stripped | URLs, JWT, OAuth, filenames |
| MIME | A–Z a–z 0–9 + / | Yes | Wrapped at 76 chars for email and PEM |