JWT signature verification explained (HS256 vs RS256)

A JWT is easy to decode, but decoding does not prove it’s trustworthy. Signature verification answers the question: “Was this token created by someone who has the key, and was it modified?”

What verification checks

HS256 vs RS256 (in plain English)

Algorithm Key type Typical use
HS256 Shared secret (same key signs and verifies) Single service or tightly controlled systems
RS256 Public/private key pair Distributed verification (many verifiers)

Common mistakes that break verification

Safe debugging tips

Try it instantly

You can decode a token and inspect its header/payload locally: JWT Decoder.

Related