Base64URL to Hex Converter
Free base64url to hex decoder — convert URL-safe Base64 into hexadecimal bytes with a live byte table, sextet bit inspector, batch mode, and copy-ready output formats. Perfect for debugging JWT signatures and crypto digests. 100% client-side, no signup.
Decode Base64URL → Hex
RFC 4648 §5Padding (=) is optional. Characters + and / belong to standard Base64 and are rejected with a precise error.
Byte table
| # | Hex | Dec | Char |
|---|
Sextet inspector (char → 6 bits)
| Char | Value | Bits |
|---|
Batch mode — one Base64URL string per line
Decode many values at once. Each line is decoded independently with the delimiter chosen above.
Worked examples — every hex value recomputed from the raw bytes
Base64URL alphabet (RFC 4648 §5)
64 characters. Positions 62 and 63 are - and _ — the URL-safe replacements for + and /.
Frequently asked questions
Why convert Base64URL to hex instead of just decoding it to text?
Hex shows the raw bytes, which is what you actually need when debugging cryptography. A JWT signature, for example, is 32 raw HMAC-SHA256 bytes: comparing two signatures byte-by-byte in hex is exact, while Base64URL hides trailing-bit details. Crypto tooling — openssl, Wireshark, hash dumps, HSM logs — speaks hex, so converting Base64URL to hex lets you diff, grep, and paste values straight into those tools.
Which characters are allowed in Base64URL?
The RFC 4648 section 5 alphabet: A–Z, a–z, 0–9, plus "-" (value 62) and "_" (value 63). The dash and underscore replace the "+" and "/" of standard Base64 so the encoded string survives inside URLs, filenames, and query parameters without percent-escaping. Trailing "=" padding may be present or omitted — both are accepted here.
Does Base64URL require "=" padding?
No. Padding is optional in Base64URL: JWTs (RFC 7515) always omit it, while some libraries keep it. This tool accepts input with or without trailing "=" and restores the missing padding internally before decoding, so "aGVsbG8" and "aGVsbG8=" decode to the same 5 bytes.
My input was rejected because it contains "+" or "/". Why?
Those two characters belong to standard Base64, not Base64URL — your string is standard Base64. You can convert it yourself by replacing every "+" with "-" and every "/" with "_" (and stripping trailing "="), or decode it with a standard Base64 decoder such as our base64-url-encode tool, which handles both alphabets.
How many bytes will a Base64URL string decode to?
Take the character count n (ignoring any "=" padding), compute floor(n × 3 / 4), then subtract the number of padding characters. Equivalently, every 4 characters decode to 3 bytes, with the final partial group contributing 1 or 2 bytes. The converter shows the exact byte count for your input under the result.
Is my input sent to a server?
No. Decoding runs entirely in your browser as client-side JavaScript — the page makes zero network requests after loading (no fetch, no XHR). You can even disconnect from the internet after the page loads and the converter keeps working, which makes it safe for pasting production tokens and keys.
How do I convert hex back to Base64URL?
In JavaScript: turn your hex into bytes, build a binary string with String.fromCharCode(...bytes), pass it through btoa(), then replace "+" with "-", "/" with "_", and strip trailing "=". In Python: base64.urlsafe_b64encode(bytes.fromhex("68 65 6c 6c 6f".replace(" ", ""))).decode().rstrip("=").
Related tools
More encoding tools are added regularly — every tool on nrtechstudio.com runs 100% in your browser.
Free tool by NRTechStudio