Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

What Is a JWT? JSON Web Tokens Explained Simply

A JWT carries JSON claims in a compact format. Learn what its parts mean, when token contents are readable, and why decoding is not validation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A JSON Web Token (JWT) is a compact, URL-safe format for carrying claims—statements represented as a JSON object. A JWT may be signed or protected with a message authentication code (MAC), encrypted, or both. The common readable, signed form protects integrity but does not hide its contents: anyone who obtains it may be able to read its claims.

What does a JWT contain?

A claim is a name-and-value statement, such as who issued a token, which subject it concerns, or when it expires. The JWT standard defines registered claim names including iss (issuer), sub (subject), aud (audience), exp (expiration time), nbf (not-before time), iat (issued-at time), and jti (token identifier). These are defined names, not a checklist that every JWT must contain. An application or protocol determines which claims it requires and how to interpret them. See the IETF’s RFC 7519.

As an Amazon Associate I earn from qualifying purchases.

How is a JWT structured?

JWT is a claims format, and its compact representation depends on the protection being used. The familiar three-part token is a compact JWS: it has a protected header, a payload, and a signature or MAC, separated by dots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Protected header: metadata about the cryptographic operation, including an algorithm identifier.
  2. Payload: the claims, represented as JSON.
  3. Signature or MAC: cryptographic data used to check integrity and, depending on the scheme and key, the token’s origin.

For illustration only, a three-part token has this shape: encoded-header.encoded-payload.signature. This is a schematic, not a usable token. The header and payload are commonly Base64url-encoded JSON; Base64url encoding is a transport-friendly representation, not encryption.

Does a JWT keep its contents secret?

Not necessarily. In a signed JWS, the signature or MAC helps detect changes, but the payload is not thereby made confidential. If a token is exposed, its readable claims may be exposed too. Do not put secrets in a signed-only JWT on the assumption that its signature hides them.

A compact JWE is the encrypted JWT form and has five dot-separated parts rather than the three parts of a compact JWS. Encryption is used to provide confidentiality. Some constructions nest signing and encryption to combine protections. The IETF describes these formats in RFC 7519 and its security guidance in RFC 8725.

JWS and JWE: what is the difference?

Representation Typical compact form Protection
JWS Three dot-separated parts Signs or MACs the content to support integrity and origin validation; does not, by itself, make claims confidential.
JWE Five dot-separated parts Encrypts the content to provide confidentiality.

A nested construction can combine signing and encryption. Which form is appropriate depends on the application’s protocol and security requirements; the format alone does not establish that a token is safe to use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why decoding a JWT is not validation

Decoding only reveals how encoded parts are represented. It does not prove that a token was issued by a trusted party, has not been altered, is intended for this application, or is currently valid. An application must verify the cryptographic protection with the correct key and then check the claims and purpose it expects.

  • Use an explicit allowlist of supported algorithms, and ensure the algorithm in the header matches the cryptographic operation the application actually performs.
  • Verify the signature or MAC with the appropriate trusted key before relying on claims.
  • Check the expected issuer and audience, applicable time limits such as expiration and not-before, and any application-specific requirements.
  • Do not blindly fetch a key from a URL named in an untrusted token header; RFC 8725 warns that doing so can create server-side request forgery risk.

These are security principles, not framework-specific setup instructions. RFC 8725, the IETF’s JWT Best Current Practice published in February 2020, discusses implementation and deployment risks including unexpected algorithm acceptance. Its recommendations may be updated; check the applicable standard and errata for the system you are building.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.