glyphcount

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text, with a URL-safe mode that swaps +/ for -_ and drops padding. Unicode-safe, runs locally.

Paste text and get Base64 — "Hi" becomes SGk= — or paste Base64 (standard or URL-safe) and decode it back. Unicode is handled correctly, so 你好世界 round-trips without mojibake.Base64 inflates data by about 33%: three bytes become four characters. It is not encryption — anyone can decode it — it exists so binary data can travel through text-only channels like JSON, URLs, and email headers.

Written by Nan Liang · Updated November 2026

Frequently asked questions

Is Base64 the same as encryption?

No. Base64 is an encoding, not a cipher — decoding requires no key. Treat Base64-encoded secrets as plaintext; use real encryption (like AES or TLS) for anything confidential.

What is URL-safe Base64?

Standard Base64 uses + and /, which mean things in URLs. URL-safe mode replaces them with - and _ and drops the = padding, so the result can sit in a query string unchanged.

Why does my decoded text look wrong?

Usually a mismatch: the input was URL-safe but decoded as standard (or vice versa), or it is Base64 of compressed/encrypted data rather than plain text. Toggle URL-safe mode and try again.

What does the = at the end mean?

Padding. Base64 works in 4-character blocks; = marks a short final block. "SGk=" decodes to "Hi" (2 bytes → 3 characters + 1 pad).

Next steps

Inspecting a JWT? Our JWT decoder reads the Base64URL header and payload without sending the token anywhere.

Open the JWT Decoder →