JWT Encoder and Decoder screenshot

JWT Encoder and Decoder

Decode a JWT header and payload, check its HS256, HS384 or HS512 signature against a secret, or sign a JSON payload. Runs in your browser.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the JWT encoder and decoder does

A JWT is three base64url segments: a JSON header, a JSON payload of claims, and a signature over the first two joined by a dot. Decoding them is only base64url and JSON parsing, which is why this page can show any token, including one signed with an algorithm it cannot check. Verification is a different act: when a secret is entered the page recomputes the HMAC named in the token's own header and compares it, and that comparison is the only thing that makes the claims trustworthy — the payload is readable whether or not it is authentic. A token that declares "alg": "none" is refused rather than displayed as if it were fine, because an unsigned token can be edited by anyone. Signing re-serialises the payload compactly and signs it with the algorithm you pick; the demo secret matches the sample token, so the worked example verifies, and it should never be used for anything real. Expiry, issuer and audience are shown but not enforced here: check exp and validate the claims on your server, not in the browser that rendered them.

How to use it

JWT Encoder and Decoder: paste the JWT or JSON payload into the box above, set Mode (default "decode"), HMAC secret (default "demo-secret") and Signing algorithm (default "HS256"), and press Run to get the decoded token or signed JWT below.

Worked example

Input:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTcwMDAwMDAwMH0.kLseMUJV5ScwhjzqO_qXCZY6ZaxtbC2MGvMplEJRny8

Output:

Header
{
  "alg": "HS256",
  "typ": "JWT"
}

Payload
{
  "sub": "1234567890",
  "name": "Ada Lovelace",
  "role": "admin",
  "iat": 1700000000
}

Signature
kLseMUJV5ScwhjzqO_qXCZY6ZaxtbC2MGvMplEJRny8

signature: valid (HS256 recomputed with the secret you entered)

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JWT or JSON payload and returns decoded token or signed JWT; reloading the page discards both.

A JWT is three base64url segments: a JSON header, a JSON payload of claims, and a signature over the first two joined by a dot. Decoding them is only base64url and JSON parsing, which is why this page can show any token, including one signed with an algorithm it cannot check. Verification is a different act: when a secret is entered the page recomputes the HMAC named in the token's own header and compares it, and that comparison is the only thing that makes the claims trustworthy — the payload is readable whether or not it is authentic. A token that declares "alg": "none" is refused rather than displayed as if it were fine, because an unsigned token can be edited by anyone. Signing re-serialises the payload compactly and signs it with the algorithm you pick; the demo secret matches the sample token, so the worked example verifies, and it should never be used for anything real. Expiry, issuer and audience are shown but not enforced here: check exp and validate the claims on your server, not in the browser that rendered them.

Decode a JWT header and payload, check its HS256, HS384 or HS512 signature against a secret, or sign a JSON payload. Runs in your browser.

How to use it

JWT Encoder and Decoder: paste the JWT or JSON payload into the box above, set Mode (default "decode"), HMAC secret (default "demo-secret") and Signing algorithm (default "HS256"), and press Run to get the decoded token or signed JWT below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JWT or JSON payload and returns decoded token or signed JWT; reloading the page discards both.

What to Expect

Best for

  • Converting JWT or JSON payload to decoded token or signed JWT when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTcwMDAwMDAwMH0.kLseMUJV5ScwhjzqO_qXCZY6ZaxtbC2MGvMplEJRny8

Sample output

Header { "alg": "HS256", "typ": "JWT" } Payload { "sub": "1234567890", "name": "Ada Lovelace", "role": "admin", "iat": 1700000000 } Signature kLseMUJV5ScwhjzqO_qXCZY6ZaxtbC2MGvMplEJRny8 signature: valid (HS256 recomputed with the secret you entered)

Frequently asked questions

How do I use the jwt encoder and decoder?

JWT Encoder and Decoder: paste the JWT or JSON payload into the box above, set Mode (default "decode"), HMAC secret (default "demo-secret") and Signing algorithm (default "HS256"), and press Run to get the decoded token or signed JWT below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.