站点介绍

Mid-integration, the backend dev drops an eyJhbGciOiJIUzI1NiIs... in the thread with a single line: use this. Does it expire? Is my username in it? Would a one-character tamper get caught? Back then the answer was a trip to jwt.io. This page was built to that moment's spec: three panes, local signing and verifying.
A JWT is signed by default, not encrypted. The payload is Base64URL - an encoding, not encryption: paste the middle segment into any Base64 decoder and the content reads out plainly. The signature proves the token was not tampered with, not that it was never read.
So passwords, phone numbers and ID numbers never belong in a payload. Confidentiality belongs to TLS on the transport layer or to actual encryption schemes like JWE. This is said three times on the page - the red box up top, the Facts table, and FAQ question one - because it is the single easiest trap to fall into.
A monolith that issues and checks its own tokens uses HS256: one secret serves both ends, fast and cheap. Multi-party setups use RS256: the auth service signs with a private key while every other service verifies with the public key - verifiers never hold issuing power, so the leakage surface shrinks dramatically.
This tool signs and verifies HS256; RS256/PS256/384/512 get parsing and public-key verification (bring your own PEM; the page does not generate key pairs - private keys do not belong in a browser).
No - underline that three times. A JWT is signed by default, not encrypted: the payload is Base64URL-encoded, which is a transport encoding and not encryption, so anyone who grabs the token can read its contents directly. The signature guarantees the token was not tampered with, not that it was never read. Passwords, phone numbers and ID numbers never belong in a payload; confidentiality belongs to TLS on the transport layer or to actual encryption schemes like JWE.
HS256 is symmetric: the same secret signs and verifies, which is fast and simple - a good fit for a monolith that issues and checks its own tokens. RS256 is asymmetric: a private key signs, a public key verifies, which suits multi-party setups - the auth service holds the private key while every other service only gets the public key, so verifiers never gain issuing power. This tool signs and verifies HS256, and parses plus public-key-verifies RS256.
Two possibilities: the token was modified - touch one character of the payload and the recomputed signature stops matching, which is the entire point of signatures - or the key is wrong, meaning the verifier is not using the same secret as the issuer. Try editing one payload character and re-verifying: it must fail, and watching that failure succeed is how you know the check actually works.
exp in the payload is a Unix timestamp - the latest moment this token should be accepted. The page converts it to your local timezone and compares it with the clock: green with remaining time before expiry, red once it has passed. Note that exp is only a claim; the token itself never disappears, and whether an expired token gets rejected is the verifier's policy.
No. Parsing, signing and verifying all run in this device's browser via WebCrypto - there is no upload endpoint and it works offline. Only interface preferences live in this browser's localStorage; they do not follow you to another device, and Clear my data in the footer removes them. And do not paste production secrets into any online tool - including this one.
中文版:https://www.9314.cn/tools/jwt-tools/
评论列表 (0条)