Appearance
Accent color
Font size
Layout density
Preferences are saved on this device for the Base64 tool only.
Base64 Encoder & Decoder, zero uploads
Convert text to Base64 or decode Base64 back to readable text — with proper UTF-8 handling for accents, CJK, and emoji. Perfect for data URIs, auth headers, and JWT payloads. Runs entirely in your browser.
- 64
- Symbol alphabet
- +33%
- Size overhead
- UTF-8
- Unicode safe
How 3 bytes become 4 characters
Byte 1
01010011
'S'
Byte 2
01010110
'V'
Byte 3
01001111
'O'
010100
U
110101
1
011001
T
001111
P
"SVO" → U1ZP
The basics
What is Base64, really?
Base64 takes binary data — anything from a plain string to a PNG — and rewrites it using only 64 printable ASCII characters. Every 3 input bytes (24 bits) are sliced into four 6-bit groups, and each 6-bit value maps to one alphabet character.
The result is data that survives any text-only channel: JSON bodies, XML documents, HTTP headers, email, QR codes, and databases that would corrupt raw bytes. Decoding is the same mapping in reverse — deterministic and lossless.
- Defined by RFC 4648 — the same alphabet everywhere
- Exactly 4 output characters per 3 input bytes (+ padding)
- Transport encoding, not encryption — anyone can decode it
The alphabet
64 symbols + one pad character
Every Base64 string is built from this exact character set — plus = for padding.
A–Z
ABCDEFGHIJKLMNOPQRSTUVWXYZ
a–z
abcdefghijklmnopqrstuvwxyz
0–9
0123456789
+ /
+/
=
=
Base64URL — the variant used in JWTs and URLs — swaps + and
/ for - and
_, and usually drops the padding.
How to use
Three steps, zero waiting
Paste your input
Type or paste plain text to encode, or a Base64 string to decode. UTF-8 text — accents, CJK, emoji — is fully supported.
Choose encode or decode
Flip the direction with one click. The tool detects the mode and converts instantly as you type — no submit button.
Copy the output
Grab the result with one tap. It’s ready for your header, data URI, token, or config file — and never touched a server.
Use cases
Base64 is everywhere on the web
Six places you’ll meet it daily — whether you notice or not.
Data URIs
Embed images, fonts, and SVGs directly in CSS and HTML as data: URIs — no extra HTTP request, at the cost of ~33% more bytes.
HTTP Basic Auth
The Authorization: Basic header carries credentials as Base64. Encoding, not encryption — always pair it with HTTPS.
JSON Web Tokens
Every JWT is three Base64URL segments joined by dots. Decode the payload to inspect claims, expiry, and algorithm instantly.
Email & MIME
Attachments and non-ASCII headers travel as Base64 inside MIME. Decode raw message sources to see what was really sent.
API payloads
Binary blobs — certificates, signatures, protobuf, images — move through JSON APIs as Base64 strings.
PEM certificates
SSL certificates, CSRs, and public keys in .pem files are Base64 bodies wrapped in BEGIN/END markers.
Compare
Base64 vs. Base64URL vs. Hex
Same idea, different alphabets — pick the wrong one and your string breaks.
Base64
RFC 4648- 64-char alphabet: A–Z a–z 0–9 + /
- Padding with = to a 4-char block
- Used in MIME, data URIs, Basic Auth
"Hello+/?" → SGVsbG8rLz8=
Base64URL
URL-safe variant- Replaces + / with - _
- Padding usually omitted
- Required in JWTs, URLs, filenames
"Hello+/?" → SGVsbG8tXz8
Hex (Base16)
Not Base64- 16 symbols: 0–9 A–F
- 2 chars per byte — 2× size
- Used for hashes, colors, signatures
"Hello+/?" → 48656c6c6f
Padding, explained
Why the = signs appear
Watch how input length decides the padding on the output.
| Input | Base64 output | What happened |
|---|---|---|
| A | QQ== | 2 padding chars — 1 byte short of a group |
| Hi | SGk= | 1 padding char — 2 bytes encoded |
| Hey | SGV5 | Perfect 3-byte group, no padding |
| SEO | U0VP | Clean 4-character block |
| café | Y2Fmw6k= | é is 2 UTF-8 bytes → 5 bytes total |
FAQ
Base64 questions, answered
What is Base64 encoding?
Base64 is a binary-to-text scheme that represents every 3 bytes of data as 4 ASCII characters drawn from a 64-symbol alphabet (A–Z, a–z, 0–9, +, /). Defined in RFC 4648, it lets binary data — images, certificates, arbitrary bytes — travel through systems designed only for text, like JSON, email, and HTTP headers.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption — there’s no key and no secrecy. Anyone can decode it instantly, which is exactly the point: it exists for transport compatibility, not confidentiality. Never rely on Base64 to hide passwords, tokens, or personal data; treat anything Base64-encoded as readable plain text.
Why does Base64 output end with = or ==?
Base64 works in 3-byte groups producing 4 characters. When the input isn’t a multiple of 3 bytes, padding characters (=) fill the gap: one leftover byte gives ==, two leftover bytes give =. “Hi” becomes SGk= and “A” becomes QQ==. Padding is required in strict contexts but often dropped in URLs and JWTs.
What’s the difference between Base64 and Base64URL?
Base64URL swaps the two URL-unsafe alphabet characters: + becomes - and / becomes _, and padding is usually omitted. That makes the output safe inside URLs, filenames, and JWTs without percent-encoding. Decoders that support Base64URL accept both alphabets transparently.
How much larger does Base64 make my data?
About 33% — every 3 bytes become 4 characters, plus line-wrapping overhead in MIME contexts. It’s the price of text-safety. For size-sensitive work, compress first (gzip/Brotli), then Base64 — never the other way around, since compressed data is binary.
Can this tool handle Unicode and emoji?
Yes. The encoder converts text to UTF-8 bytes before Base64-encoding, so café, 中文, and 🚀 all round-trip perfectly. Browsers’ native btoa() chokes on non-Latin input — this tool handles the UTF-8 conversion correctly for you.
Is my data uploaded when I encode or decode?
Never. Everything runs locally in your browser — nothing you paste is transmitted, logged, or stored. That makes it safe to decode JWT payloads, authorization headers, and internal API strings that you’d never want on a third-party server.
Keep going
Pair it with these tools
URL Encoder / Decoder
Encode or decode URLs, query parameters, and percent-encoded strings.
HTML Entity Encoder / Decoder
Encode or decode HTML entities and special characters.
Open Graph Generator
Create social media preview tags for Facebook, Twitter, and LinkedIn.
HTML Minifier
Minify HTML to reduce page size and stay under Google's 2MB crawl limit.
$ ready --when-you-are
Encode it. Decode it. Done.
Paste your string above — instant conversion, UTF-8 safe, and nothing ever leaves this tab.