Overview
Encode/decode Base64URL (URL-safe Base64) used by JWT, JWS, and many web tokens. It replaces + and / with - and _ and often omits padding. Runs locally in your browser.
Use cases
- Decode JWT header/payload segments manually.
- Convert Base64URL to standard Base64 when debugging across tools.
- Create URL-safe encoded test fixtures.
Common pitfalls
- Padding is often omitted; tools can infer it, but truncated inputs can’t be recovered.
- Base64URL strings copied from URLs may be URL-decoded/altered; ensure you copy the raw token.
FAQs
How is Base64URL different from Base64?
Base64URL uses URL-safe characters (- and _) and often omits trailing = padding.
Why does decode fail?
The input may be truncated or corrupted. Padding is handled when possible, but missing data can’t be recovered.
Do I need padding (=)?
Often no. Many Base64URL strings omit padding; tools can infer it. If needed, add = until length is a multiple of 4.
Is Base64URL encryption?
No. It’s reversible encoding, not encryption.
Examples
Input
Hello
Output
SGVsbG8