Base64URL Encode / Decode
Base64URL conversion (-/_).
ToolHub Pro — Remove ads and unlock one-click file export on text-output tools below (image tool keeps its own download).
You may also need
About
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.
Examples
Input
Hello
Output
SGVsbG8
FAQ
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.
Limitations
- If the input is truncated, decoding may fail even after padding is added.
Recommended
Affiliate slots. Configure real links via environment variables.
No recommendations configured.