Base64, JWT, and URL Decoder
Paste here
Check the signature
Decoded
Read on this device. What you paste is never sent or stored, and it works with Wi-Fi off.
Anyone can read a JWT or Base64. They are not encryption.
Make a JWT secretMake a passwordMade-up samples
JWT
Base64, URL, hex
Type
Decode a JWT, Base64, or URL in Your Browser
Paste a JWT, Base64, Base64URL, URL-encoded text, or hex, and the decoder works out which it is and shows what’s inside. Press Encode to go the other way, or drop a file to turn it into Base64.
What you paste is never sent: decoding happens in this page, on your device. Clear empties everything, and leaving the page empties the boxes.
Jump to: Reading a JWT · Decoding is not verifying · Base64, URL, and hex · Encoding is not encryption · Questions
Reading a JWT
A JSON Web Token is three parts joined by dots: a header, a payload, and a signature. The header and payload are only Base64URL, so anyone holding the token can read them.
- The header says how the token was signed, for example HS256 or RS256.
- The payload holds the claims: who the token is for, who issued it, and when it expires.
- The signature shows who made the token, but only to someone with the right key.
The decoder shows the header and payload as colored JSON and writes every time in the token as a date and in plain words, like “expired 3 days ago” or “valid for 59 more minutes”. It warns when a token has run out, isn’t valid yet, isn’t signed, has no expiry, or was made to last a very long time.
Decoding Is Not Verifying
Decoding a JWT does not check its signature. Anyone can write a token that claims anything. Reading it tells you what it says, not whether it’s genuine. A server must check the signature, and the expiry, before it trusts a single claim.
To check a signature here, type the secret for HS256, HS384, or HS512, or paste the public key for RS, PS, ES, or EdDSA tokens, as PEM, a certificate, a JWK, or a JWKS. The check runs in this page. Private keys are refused: a public key is all a check needs.
Even so, use a test secret. Never paste a live signing secret, or a token that still works, into any website: a valid token lets whoever holds it act as you until it expires.
Base64, URL Encoding, and Hex
- Base64
- Turns any bytes, even an image, into plain letters and digits, so they can travel in email, JSON, and
data:addresses. It ends with one or two=when the length needs padding. - Base64URL
- The same, with
-and_instead of+and/, and usually no padding, so it’s safe in web addresses. JWTs use it. - URL encoding
- Writes characters that can’t go in a web address as
%and two hex digits: a space becomes%20, and é becomes%C3%A9. Web forms write a space as+. - Hex
- Two characters, 0 to 9 and a to f, for each byte. Spaces, colons,
0x, and\xare all fine.
Missing padding is added for you. If something won’t decode, the error says which character is wrong and where. Base64 that holds a PNG, JPEG, GIF, WebP, or SVG is shown as a picture (scripts inside an SVG can’t run), and any bytes can be saved as a file. Paste a whole web address to see its parts and parameters in a table; if a parameter holds a JWT, you can decode it from there.
Encoding Is Not Encryption
Base64, URL encoding, and hex only change how bytes are written. There’s no key, so anyone can turn them back in a second. A password written in Base64 in a config file isn’t hidden, and neither is anything in a JWT’s payload.
To keep something secret, encrypt it with a real key, and keep passwords and personal details out of token payloads. If you need a signing secret, make a JWT secret on Keys and IDs.
Frequently Asked Questions
Is it safe to paste a JWT into a decoder?
Here, the token stays in your browser and is never sent. Some decoder sites send what you paste to their server when you press the button. Either way, treat a working token like a password: anyone who has it can use it until it expires, so use expired or test tokens when you can.
Can a JWT be decoded without the secret?
Yes. The header and payload are only Base64URL, so no key is needed to read them. The secret or public key is needed to check the signature, and the secret to make a new token.
What does “alg: none” mean?
The token isn’t signed at all, so anyone could have written or changed it. Servers must reject these tokens, and the decoder marks them as not signed.
Why won’t my Base64 decode?
Usually because of a character that isn’t part of Base64, often picked up when copying, or because the text was cut off part way. The decoder says which character is wrong and where, adds missing padding itself, and copes with line breaks.
What is the difference between Base64 and Base64URL?
Base64URL uses - and _ instead of + and /, which mean something in web addresses, and usually leaves out the = padding. The bytes inside are the same, and the decoder tells them apart on its own.
Why does URL decoding turn + into a space?
Web forms send a space as +, so a plus sign after the ? in an address usually means a space. Elsewhere it’s a real plus sign. The + is a space setting lets you choose.
Can I decode an encrypted JWT?
Only its header. An encrypted token (a JWE) has five parts instead of three, and its contents can only be read with the key it was encrypted for. The decoder shows the header and says the rest is encrypted.