Base64URL & Base32 Converter
Convert text between standard Base64, URL-safe Base64URL (RFC 4648) and Base32. Useful for JWTs, tokens and OTP secrets. Runs locally in your browser.
Text to encode
Stays in your browserResult
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to Encode / Decode, JSON Parser or Hash Generator.
Free Online Base64URL & Base32 Encoder / Decoder
Convert text between standard Base64, URL-safe Base64URL (RFC 4648), and Base32 — pick a format, choose Encode or Decode, and convert instantly in your browser. For ordinary Base64, URL and hex encoding use Encode / Decode. This Base64URL converter encodes and decodes URL-safe Base64 and Base32 text. It helps when tokens, filenames, or URL parameters use URL-safe Base64 or Base32 rather than ordinary readable text.
Three related but distinct formats
Base64 is the everyday format for embedding binary data as text, using A-Z, a-z, 0-9, +, /, and = padding. Base64URL (RFC 4648 §5) swaps +// for -/_ and drops the padding, specifically so the result can be used directly inside a URL path, query parameter, or filename without being percent-encoded further — this is the format JWTs use for each of their three segments. Base32 (RFC 4648 §6) uses a smaller 32-character alphabet (A-Z, 2-7) that's case-insensitive and avoids easily-confused characters, at the cost of a ~20% larger output than Base64 for the same input.
How to use this converter
Choose Encode or Decode, select which of the three formats you're working with, and enter your text. Encoding accepts any text (including Unicode); decoding expects text that's actually valid in the selected format and reports a clear error otherwise, rather than returning garbled output.
Why Base64 is not encryption
It's worth stating plainly: none of these three formats provide any confidentiality. There's no secret key involved in any direction — anyone who sees Base64, Base64URL, or Base32 text can decode it back to the original instantly, with nothing more than this page (or a one-line script). If you need to actually protect data from being read, encode isn't the right word — use the AES-256 encryption or RSA encryption tools instead, both of which require a secret to reverse.
Common use cases
- Decoding the header or payload segment of a JWT, which uses Base64URL without padding
- Converting a value to Base64URL before using it in a URL path segment or filename
- Decoding a TOTP/2FA secret key shared in Base32, or generating one for a script
- Converting standard Base64 (with +, /, =) into a URL-safe form for a query parameter
Worked example
Encoding hello gives aGVsbG8= in standard Base64, aGVsbG8 in Base64URL (no padding), and NBSWY3DP in Base32 — all three decode back to the exact same 5-character text, and all Unicode (accented characters, emoji) round-trips correctly through every format, confirmed by testing.
Common mistakes and edge cases
- Standard Base64 decode mode doesn't accept
-or_— pasting Base64URL text there fails with a clear error instead of silently producing wrong bytes. Match the Format dropdown to what you're actually pasting. - Missing
=padding on standard Base64 input is tolerated on decode — as tested, you don't need to manually re-add padding that got stripped somewhere along the way.