FlipMyFormat

JWT Decoder

A free JWT decoder for JSON Web Tokens: see the header, payload and every claim with readable dates, check the signature with a secret or public key, and sign new test tokens. Everything runs in your browser.

Encoded token

Decoded and verified in your browser with Web Crypto. Tokens and keys are never uploaded or stored.

People also use

How to decode a JWT in three steps

Paste a JSON Web Token into the Encoded token box and the JWT decoder reads it as you type. The three parts appear in colour under the box, the header and payload show as formatted JSON, and a table lists every claim with what it means. Times such as exp and iat are shown as dates in your own time zone, with a note such as in 2 h or 3 days ago.

A badge next to Payload says whether the token has expired, and a yellow box lists anything that looks risky. Paste a secret or a public key under Verify signature to check that the token is genuine. Switch the mode to Encode and sign to build a new token from your own header and payload.

When the page opens, a sample HS256 token is already in the box, so you can see how everything looks. You can paste with or without the word Bearer in front; it is removed for you, and so are spaces and line breaks.

  1. 1

    Paste the token

    Paste a JWT (it usually starts with eyJ) into Encoded token. A Bearer prefix, spaces and line breaks are removed for you.

  2. 2

    Read header, payload and claims

    The header and payload appear as coloured JSON with Copy buttons. The claims table explains each claim and shows times as dates.

  3. 3

    Verify or sign

    Paste the secret or public key under Verify signature to check the token, or switch to Encode and sign to make a new one.

Nothing on this page is saved: not the token, not the key and not your choices. Reload the page and you start again with the sample token.

JWT decode token online: what each part means

A JSON Web Token (JWT) is a short piece of text that carries facts about a user or a system, called claims, in a form that can be checked. It has three parts joined by dots: header.payload.signature. Each part is written in Base64URL, a form of Base64 that is safe in web addresses because it uses - and _ instead of + and /, and leaves out the = padding.

The header, shown in red, is a small JSON object that names the signing algorithm in alg, often the type in typ, and sometimes a key ID in kid. The payload, in purple, holds the claims: who the token is about, who issued it, when it expires and anything else the issuer added. The signature, in blue, is made from the first two parts with a secret or a private key.

This is what a “jwt decode token online” search is usually after: turning the unreadable eyJ… text into plain JSON. Decoding simply undoes the Base64URL step. No key is needed and nothing is decrypted, because nothing was encrypted in the first place.

PartColourContainsExample
HeaderRedAlgorithm (alg), type (typ), key ID (kid){"alg":"HS256","typ":"JWT"}
PayloadPurpleClaims such as sub, iss, aud, iat and exp{"sub":"1234567890","exp":1767225600}
SignatureBlueBytes made with a secret or private keySflKxwRJSMeKKF2QT4fwpM…

JWT decoder online: paste and read in a second

Most of the time you just want to see what is inside a token: which user it belongs to, which roles or scopes it carries and when it expires. A JWT decoder online should show that the moment you paste, without an account or a button, and here the result updates as you type.

Copy the header or payload as formatted JSON with the Copy buttons. If the payload is long or deeply nested, the JSON Formatter helps you read it. If the token came from a link such as ?token=…, it may still be percent-encoded; decode it with URL Encode first.

Every claim explained, with readable dates

The claims table is where the JWT decoder saves the most time. It lists each claim with a short meaning and its value, covering the standard claims (RFC 7519) and common OpenID Connect ones such as scope, roles, nonce and sid.

Times in a JWT are NumericDate values: seconds since 1 January 1970 UTC. A value like 1767225600 means nothing at a glance, so for exp, nbf, iat, auth_time and updated_at the table shows the date and time in your browser's time zone and how far away it is, such as in 45 min or 2 days ago. For any other Unix time, the Timestamp Converter does the same job.

Next to the word Payload, a badge sums up exp: Valid for 59 min in green, or Expired 3 h ago in red. The badge only reads exp from your device's clock. It does not check the signature, so a token can look valid and still be fake.

ClaimMeaningWhat to look for
issIssuer: who created the tokenUsually the URL of the login service
subSubject: the user or thing it is aboutA user ID, unique for that issuer
audAudience: who it is meant forAn API or client ID; can be a list
expExpires atThe token must be rejected after this time
nbfNot valid beforeThe token must be rejected before this time
iatIssued atWhen the issuer created the token
jtiToken IDA unique ID that helps stop replay of the same token
scope / scpPermissions (scopes)What the token allows, such as read:orders
azp / client_idAuthorized party, client IDThe app the token was issued to
nonceNonceTies an ID token to one login request

JWT verify signature online: decoding is not verifying

Decoding shows what a token says. Verifying proves who said it. Anyone can create a token with any payload, for example “admin”: true, and it decodes perfectly. Only the signature tells you whether it was made by someone who holds the right key, and whether a single character has changed since.

To verify, paste the key into the Verify signature box below the token. The check runs as soon as there is a key, using the algorithm from the token's header. You get ✓ Signature verified in green or ✗ Invalid signature in red. If the key cannot be used at all, for example a key of the wrong type for the algorithm, a yellow message explains why.

A jwt verify signature online check is only as good as the key you give it. Take the secret from your own configuration, or the public key from the issuer's published key set, never from the token itself. Your API must still run the same check on the server for every request; a page like this is for debugging and learning. The Algorithm menu normally says From token (HS256) or similar; you can override it for tests.

JWT decoder with secret: HS256, HS384 and HS512

Tokens with alg HS256, HS384 or HS512 are signed with HMAC and a shared secret: the same secret signs and verifies. Paste it into the Secret box and the result appears at once. A JWT decoder with secret support has to know how the secret is written, so there is a checkbox: The secret is Base64 / Base64URL encoded.

Leave it off when your configuration holds plain text, such as a passphrase. Tick it when the secret is a random key written in Base64 or Base64URL, as many frameworks and identity services store it. If verification fails with a secret you are sure is right, this checkbox is the first thing to try.

The JWT algorithms standard (RFC 7518) asks for an HMAC key at least as long as the hash: 256 bits for HS256, 384 for HS384 and 512 for HS512. If your secret is shorter, the result still shows, with a note saying the secret is shorter than the standard allows. Short or guessable secrets can be cracked from a single captured token, so use a long random one.

JWT decode with public key: PEM, certificate, JWK or JWKS

Tokens from login services usually use a key pair: the issuer signs with a private key and publishes the public key so anyone can verify. For RS, PS, ES and EdDSA tokens the key box accepts four forms, and it works out which one you pasted.

FormStarts withNotes
PEM public key-----BEGIN PUBLIC KEY-----The standard SPKI format
X.509 certificate-----BEGIN CERTIFICATE-----The public key is read from the certificate, and a note says so
JWK{ "kty": "RSA", "n": …, "e": … }One key as JSON
JWKS{ "keys": [ … ] }A key set; the key is picked by the token's kid

A key set is the quickest way to do a jwt decode with public key check against a real provider. Open the issuer's key set, often at /.well-known/jwks.json, copy the whole JSON and paste it. The page picks the key whose kid matches the token's header, which is shown next to the Algorithm menu. With no match it uses the first key made for that algorithm, and the note under the result names the key used, such as Key “abc123” of 3 from the key set.

Certificates are common in older enterprise setups, where the signing key is shared as a .cer or .pem file. Paste the whole -----BEGIN CERTIFICATE----- block and the public key is read out of it. The certificate's dates and chain are not checked; only its key is used.

JWT decoder with signature checks for RS, PS, ES and EdDSA

Each algorithm family signs in its own way, and the page uses the browser's Web Crypto for all of them. A JWT decoder with signature checking for every common algorithm saves you from writing test code just to see whether a key and a token belong together.

algMethodKeyNotes
HS256, HS384, HS512HMAC with SHA-2Shared secretThe same secret signs and verifies
RS256, RS384, RS512RSASSA-PKCS1-v1_5RSA key pairA very common choice for login services
PS256, PS384, PS512RSA-PSSRSA key pairSalt length equals the hash length
ES256ECDSA, curve P-256EC key pairShort keys and signatures
ES384ECDSA, curve P-384EC key pairLonger curve, SHA-384
ES512ECDSA, curve P-521EC key pairThe curve is P-521, not P-512
EdDSAEd25519Ed25519 key pairNeeds Ed25519 support in the browser

RSA keys work for both RS and PS tokens, but the token's alg decides the method, and a signature made one way will not verify the other way. EdDSA here means Ed25519; on an older browser without Ed25519 in Web Crypto, you will see a message that the key could not be used.

Old PEM formats: convert them first

Web Crypto reads public keys in the SPKI format (BEGIN PUBLIC KEY) and private keys in PKCS#8 (BEGIN PRIVATE KEY). Some tools still write older formats: BEGIN RSA PUBLIC KEY, BEGIN RSA PRIVATE KEY or BEGIN EC PRIVATE KEY. If you paste one of those, the page says so and shows the OpenSSL command that converts it:

Your key starts withCommandResult
BEGIN RSA PRIVATE KEY or BEGIN EC PRIVATE KEYopenssl pkey -in key.pem -out key-pkcs8.pemA PKCS#8 private key for signing
BEGIN RSA PUBLIC KEYopenssl rsa -RSAPublicKey_in -in key.pem -puboutAn SPKI public key for verifying

Run the command on your own computer, then paste the new file into the JWT decoder.

JWT decode without secret: why payloads are not secret

You do not need a key to read a token. Base64URL is an encoding, not encryption, so anyone who gets a copy of a token can read every claim in it. A jwt decode without secret works on any signed token, and that is by design: the signature protects the token against changes, not against being read.

This has a practical side. Never put passwords, card numbers, national ID numbers or other private data in a JWT payload. If the page sees claim names that suggest such data, such as password, secret, card, ssn or cvv, it warns you. Put in only what the receiver needs, such as a user ID and roles, and look up the rest on the server.

Treat a token like a password while it is valid, too. Anyone who holds it can use it until it expires, which is why short expiry times matter.

JWS and JWE: signed tokens and encrypted tokens

Almost every JWT you meet is a JWS, a signed token with three parts. There is also JWE, an encrypted token with five parts: header, encrypted key, initialization vector, ciphertext and authentication tag. Its content really is secret and can only be read with the right decryption key.

If you paste a JWE, the page recognises the five parts, shows the header, which is not encrypted and names the algorithms (for example alg RSA-OAEP and enc A256GCM), and tells you the payload can only be read with the private key. It does not decrypt JWE tokens.

JWT decoder and encoder: build and sign test tokens

Switch the mode to Encode and sign and the page becomes a JWT decoder and encoder in one. Write the header and payload as JSON on the left, pick an algorithm, enter a key and press Sign token. The alg in the header is set for you from the Algorithm menu, so the header only needs typ and anything extra, such as kid.

The payload starts with a sample: sub, name, admin, iat and an exp one hour later. Buttons under it save typing: iat = now sets the issued time, exp in 1 hour, exp in 1 day and exp in 7 days set the expiry, and add jti inserts a random unique ID.

For HS algorithms, type a secret or press Random 256-bit secret to get a strong one from your browser's random generator, written in Base64URL with the matching checkbox ticked. For RS, PS, ES and EdDSA, paste a private key in PKCS#8 PEM (BEGIN PRIVATE KEY) or a private JWK. The finished token appears with Copy token and Decode it buttons. Decode it opens the token in the decoder and, for HS tokens, fills in the secret, so you can watch it verify.

Signing here is meant for tests, demos and debugging. Keep real production signing keys on your server, in a secret store, and let your server create real tokens.

JWT decoder offline: no server needed once loaded

Everything this page does, it does with the browser's built-in Web Crypto and its own code. Once the page has loaded, it needs no server to decode, verify or sign. Tokens and keys are not sent anywhere, and no request goes out when you paste.

That is what most people want from a JWT decoder offline: it keeps working when the network drops, and it leaks nothing. Load the page, and you can disconnect and keep decoding and verifying. It is a web page, not an installable app, so keep the tab open. A key set has to be pasted in by you; the page does not fetch keys from URLs.

A JWT decoder tool that warns you about risky tokens

A JWT decoder tool is most useful when it points out problems you might miss. Below the claims table, a yellow box lists anything that looks wrong:

WarningWhat it means
alg “none”The token is unsigned and servers must reject it. Verification refuses it too.
No expiry (exp)The token never expires on its own, so a stolen copy works forever.
Lifetime over 30 daysexp is more than 30 days after iat; long-lived tokens are risky if stolen.
Not valid yetnbf is in the future, so a correct server will reject the token for now.
Issued in the futureiat is more than 5 minutes ahead; check the issuer's clock.
Sensitive dataClaim names such as password, secret, card, ssn or cvv; payloads can be read by anyone.
Algorithm confusionAn HS token is being checked with a public key or certificate.
+ / or = charactersJWTs should use the Base64URL alphabet without padding.
The payload is not JSONThe middle part decoded to plain text instead of a JSON object.

The algorithm confusion warning deserves a word. Some old libraries, given an HS256 token and an RSA public key, used the public key as the HMAC secret. Because the public key is public, an attacker could then sign any token. A safe server fixes the algorithm it expects and keeps HMAC secrets and public keys apart.

Good practice for JSON Web Tokens

A decoder helps you look at tokens. These habits help keep them safe in your own app:

  • Keep access tokens short-lived, from minutes to an hour, and use refresh tokens for longer sessions.
  • Always send tokens over HTTPS, and keep them out of URLs, where they end up in logs and browser history.
  • Verify the signature on every request with the algorithm fixed in your server code, and reject alg none.
  • Check exp, nbf, iss and aud as well as the signature, allowing only a small clock difference.
  • Use long random HMAC secrets, at least as long as the hash, or an RSA, EC or Ed25519 key pair.
  • Keep the payload small and free of private data, since anyone with the token can read it.
  • Think about where the browser keeps tokens. Any script on the page can read localStorage, so many teams prefer secure, HttpOnly cookies when that fits their app; each option has trade-offs.
  • Rotate keys from time to time and publish them in a key set with a kid, so old and new keys can work side by side.

Troubleshooting: messages and what they mean

Invalid signature with the right secret

Try the Base64 checkbox, since many secrets are stored encoded. Also look for a space or line break copied with the secret.

This one has 2 parts

Part of the token was lost when copying, often at a line break or because a log cut it short. Copy it again from the source.

The header is not valid Base64URL JSON

Something other than a token was pasted, or its start was cut off. A JWT header almost always starts with eyJ.

This is an old RSA PUBLIC KEY format

Convert the key with the OpenSSL command shown in the message, then paste the new PEM.

Unsupported algorithm

The token uses an algorithm other than HS, RS, PS, ES or EdDSA, or alg is missing. Pick one in the Algorithm menu if you know it.

The key could not be used

The key does not suit the algorithm: for example an EC key for an RS token, a private key in the verify box, or Ed25519 on an older browser.

Expired, but my API accepts it

The badge compares exp with your device's clock. Check that clock, and whether the API allows some leeway.

Copy does not work

Some browsers block the clipboard in private windows. Select the text and press Ctrl+C, or Cmd+C on a Mac.

All settings at a glance

SettingChoicesWhat it does
ModeDecode and verify, Encode and signRead and check a token, or build a new one
Encoded tokenAny JWT or JWEBearer prefix, spaces and line breaks are removed
Algorithm (verify)From token, or any of 13Override the alg from the header for testing
Secret or public keySecret, PEM, certificate, JWK, JWKSThe key used to check the signature
Base64 checkboxOn or offTreat the HS secret as Base64 or Base64URL bytes
Header and PayloadJSONThe content of a new token
Payload buttonsiat = now, exp in 1 hour, 1 day, 7 days, add jtiSet common time claims and a unique ID
Signing keySecret, Random 256-bit secret, PKCS#8 PEM, private JWKThe key used by Sign token

Is it safe? Tokens and keys stay in your browser

Decoding and verifying happen in your browser with Web Crypto. Tokens, secrets and keys are never uploaded, never logged and never put in the address bar, and the page stores nothing, not even your choices.

Even so, think twice before pasting live tokens or production keys into any page outside your own systems, this JWT decoder included. A test token or an expired one is the safer thing to paste. If you have ever shared a production secret somewhere you do not control, rotating it is the careful step.

What to do next

Need a strong HMAC secret? The Password Generator makes long random ones, and the Hash Generator computes HMAC-SHA256 values you can compare by hand. The Base64 Encode and Decode tool converts a secret between text and Base64. The UUID Generator gives you values for jti claims, and the Diff Checker compares two decoded payloads side by side.

Frequently asked questions

How do I use this JWT decoder online?

Paste the token into the Encoded token box. The header, payload and a table of claims appear at once, with times shown as dates. No account and no button are needed.

What does the JWT decoder and encoder mode do?

Switch to Encode and sign, write a header and payload, choose an algorithm and a key, and press Sign token. The new token can be copied, or opened in the decoder with Decode it.

How does the JWT decoder with secret check work?

For HS256, HS384 and HS512 tokens, paste the shared secret under Verify signature. Tick the Base64 checkbox if the secret is stored in Base64 or Base64URL. You then see Signature verified or Invalid signature.

Which algorithms does the JWT decoder with signature check support?

HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512 and EdDSA (Ed25519). Every check uses the browser's built-in Web Crypto.

Can I use the JWT decoder offline?

Once the page has loaded, it needs no server to decode, verify or sign, so it keeps working if your connection drops. It is a web page, not an installable app, so keep the tab open.

What does the JWT decoder tool warn about?

It warns about alg none, a missing exp, a lifetime over 30 days, nbf or iat in the future, claim names that suggest sensitive data, and an HS token checked with a public key, known as algorithm confusion.

What is the easiest way to JWT decode token online?

Paste the token into the box at the top of this page. It is decoded as you type, the three parts are coloured, and every claim is explained.

Can I JWT decode without secret?

Yes. Reading a token needs no key, because the header and payload are only Base64URL encoded. A secret or public key is needed only to verify the signature.

How do I JWT decode with public key verification?

Paste the issuer's key under Verify signature: a PEM public key, a certificate, a JWK or a whole JWKS. With a JWKS, the key is picked by the kid in the token's header.

Is a JWT verify signature online check enough for my app?

No. It is good for debugging, but your server must verify every token itself, with the expected algorithm fixed in code. It should also check exp, nbf, iss and aud.

What is the difference between decoding and verifying?

Decoding turns the Base64URL text into readable JSON, and anyone can do it. Verifying checks the signature with the right key, which proves the token was issued by the key holder and has not been changed.

Is the data in a JWT encrypted?

No. A normal signed JWT is only encoded, so anyone with the token can read the payload. Do not put passwords or other private data in it. Only a JWE, with five parts, is encrypted.

What is a JWE, and can this page decrypt it?

A JWE is an encrypted token with five parts. The page recognises it and shows its header, but it does not decrypt the payload, which needs the private key.

Why does my token say Expired?

The badge compares the exp claim with your device's clock. If exp is in the past, the token has expired and a correct server will reject it. Get a new token, or check your clock.

Why do I get Invalid signature with the right secret?

The secret may be stored in Base64, so try the Base64 checkbox. Also make sure no space or line break was copied with it and that the token was not changed.

My key starts with BEGIN RSA PUBLIC KEY. What do I do?

That is an older format. Convert it with openssl rsa -RSAPublicKey_in -in key.pem -pubout, then paste the result. For an old private key, use openssl pkey -in key.pem -out key-pkcs8.pem.

Where do I find a provider's public keys?

Most login services publish a JWKS, often at /.well-known/jwks.json, or at the jwks_uri listed in /.well-known/openid-configuration. Copy the whole JSON into the key box.

What do iat, exp and nbf mean?

iat is when the token was issued, exp is when it expires and nbf is the time before which it must not be accepted. All three are seconds since 1970, and the claims table shows them as dates.

What is the alg none warning?

A token with alg none has no signature, so anyone could have written it. Servers must reject such tokens, and the verify check here refuses them.

Can I sign tokens with RS256 or ES256 here?

Yes. In Encode and sign, choose the algorithm and paste a private key in PKCS#8 PEM (BEGIN PRIVATE KEY) or a private JWK. Use test keys; keep production keys on your server.

Are my tokens and keys uploaded or stored?

No. Decoding and verifying happen in your browser with Web Crypto. Tokens and keys are never uploaded or stored, and the page saves nothing between visits.

Decode a token now

Read, verify and sign JSON Web Tokens. Free, private and computed on your device.

Back to the tool

Last updated October 2026 · Written and maintained by the FlipMyFormat team