GUIDE深度 · Deep dive

URL-Safe Base64

Standard Base64 uses + and /, which need escaping in URLs, so the URL-safe variant uses - and _ and often drops trailing =. To decode, map them back to +/ and restore padding.

更新 2026-10-31 · 公式可核验

Character mapping

Standard: A-Z a-z 0-9 + /, with = padding.

URL-safe: + to -, / to _, with optional = padding.

JWTs and file names

JWTs use Base64URL, with three dot-separated segments.

Avoid / and = in file names; URL-safe is safer.

FAQ

Can I decode without =?

Yes; restore padding to a multiple of four before decoding.

Can I convert between them?

Yes; map the characters and handle padding.

Sources

Related calculators

Base64 Encoder/DecoderEncode text to Base64 or decode Base64 back to UTF-8 text.

More guides

Base64 Is Not EncryptionRead guide