Developer Tools

What Is a JWT? JSON Web Tokens Explained

Learn how JWTs are structured, what the signature actually verifies, and why a JWT is signed, not encrypted.

Brekzy Team Published September 8, 2026

On this page
  1. What Is a JWT?
  2. The Three Parts
  3. What the Signature Actually Verifies
  4. Common Mistakes
  5. Use the JWT Decoder

A JWT (JSON Web Token) is a compact way to pass verified information between two parties, commonly used to prove a user is logged in without the server needing to look anything up in a database on every request.

What Is a JWT?

A JWT is a string made of three parts separated by dots: header.payload.signature. Both the header and payload are What Is JSON? objects, each converted to text using a URL-safe variant of What Is Base64 Encoding?. The signature is what makes the token trustworthy, described further below.

The Three Parts

Header (algorithm and token type):

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

Base64URL-encoded: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9

Payload (the actual data, called “claims”):

{"sub":"1234567890","name":"John Doe","iat":1516239022}

Base64URL-encoded: eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ

Signature: a cryptographic signature computed from the header and payload using a secret key, appended as the third part.

What the Signature Actually Verifies

The signature proves the token hasn’t been tampered with since it was issued, since changing even one character of the header or payload would produce a different signature. It does not encrypt the payload; anyone can decode the header and payload and read them directly.

Common Mistakes

  • Assuming a JWT is encrypted. It’s signed, not encrypted. The header and payload are just Base64URL-encoded JSON, readable by anyone who decodes them, never put secret data in a JWT payload.
  • Skipping signature verification. A JWT’s payload can be read by anyone, but only a system with the correct secret key can verify the signature is genuine; systems that decode a JWT without verifying its signature can be fooled by a forged token.
  • Storing a JWT somewhere insecure. Since anyone holding a valid JWT can typically use it to authenticate, it needs to be protected in transit and storage much like a password would be.

Use the JWT Decoder

The JWT Decoder decodes a JWT’s header and payload instantly, so you can inspect its contents directly.

Try it yourself

JWT Decoder

Try our JWT Decoder →

Frequently Asked Questions

Is a JWT encrypted?

No. A standard JWT is signed, not encrypted. Its header and payload are readable by anyone who decodes the Base64URL text, the signature only proves the content hasn’t been altered.

What are the three parts of a JWT?

The header (algorithm and token type), the payload (the actual claims/data), and the signature (which verifies the token’s authenticity), separated by dots.

Can I put sensitive data in a JWT payload?

Not safely, since the payload is readable by anyone who has the token. Sensitive data should be encrypted separately or kept out of the token entirely.

What does the JWT signature protect against?

It protects against tampering: any change to the header or payload after the token was issued would produce a signature that no longer matches, revealing the token has been altered.

Why are JWTs commonly used for login sessions?

Because a server can verify a JWT’s signature without needing to look anything up in a database, making authentication checks fast and easy to scale across multiple servers.

Explore More

Find the right tool, or keep reading Brekzy's other guides.