Skip to content

JWT Generator

Runs in your browser

Edit the claims, pick an algorithm, and the token re-signs as you type. Key-pair algorithms get a fresh key pair made in this tab.

Algorithm

Header

alg is set from the algorithm above, so the header can't disagree with the signature.

Payload

Expires in:

Token

Signing...

How this one works

The header and payload are serialised as compact JSON, Base64URL-encoded and joined with a dot. That string is signed with your browser's WebCrypto and the signature is appended as the third part.

HS algorithms sign with a shared secret. For RS, PS, ES and EdDSA a key pair is made in this tab when you pick one: the private key signs, and the public key, shown as PEM or JWK, is what your server verifies with. You can paste your own private key instead, as PKCS#8, PKCS#1 or SEC1 PEM, or as a JWK.

The expiry buttons set iat to now and exp that far ahead, in seconds, which is what JWT libraries expect.

Questions

What should I use generated tokens for?

Local development and tests: fixtures for an API that expects a bearer token, reproducing a bug with specific claims, or checking how your code handles an expired token.

Which algorithm should I pick?

Match what your server expects. RS256 is what most identity providers issue. HS256 suits a single service that both signs and checks. ES256 and EdDSA give the same strength as RS256 with much shorter keys and tokens.

Is the key stored anywhere?

No. Secrets and key pairs live in this page's memory while the tab is open and are never written to storage or sent over the network. A new key pair is made each time you open the page.

Keyboard shortcuts

Global

  • Show this shortcuts dialogShift?
  • Toggle light / dark themeCtrlShiftL
  • Close dialogsEsc

Formatter & Validator

  • Format JSONCtrlEnter
  • Minify JSONCtrlShiftM
  • Copy outputCtrlShiftC
  • Download output as .jsonCtrlShiftS
  • Clear input and outputCtrlShiftX

Tree Viewer

  • Focus the search box/
  • Expand all nodesCtrlShiftE
  • Collapse all nodesCtrlShiftR

Diff

  • Swap document A and BCtrlShiftS

Time & date tools

  • Use the current time (Epoch Converter)CtrlEnter
  • Copy the main resultCtrlShiftC
  • Clear the inputCtrlShiftX

PHP Unserialize & Serialize

  • Convert an input over 2 MBCtrlEnter
  • Copy outputCtrlShiftC
  • Download outputCtrlShiftS
  • Clear input and outputCtrlShiftX

Keys & IDs

  • Generate a new token or UUID batchCtrlEnter
  • Copy the resultCtrlShiftC

JSON tools

JSON FormatterPretty-print or minify
JSON ValidatorCheck strict JSON validity
JSON Tree ViewerBrowse JSON as a tree
JSON DiffCompare two documents
JSON Path FinderExplore JSONPath expressions
JSON to CSVFlatten JSON into rows
CSV to JSONTurn rows back into objects
PHP UnserializeSerialized PHP to JSON
PHP SerializeJSON to serialized PHP

JWT tools

JWT DecoderClaims, signature and expiry
JWT VerifierWith a secret, PEM key or JWKS
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Time & date tools

Epoch ConverterTimestamps to real dates
Cron Expression ExplainerCron in plain English
Time Zone ConverterOne moment, many cities
Duration CalculatorDate maths and durations

Keys & IDs

Password GeneratorSecure random secrets
UUID Generatorv1, v4, v5 or v7 UUIDs

Code formatters

SQL FormatterBeautify or minify SQL
HTML FormatterBeautify or minify HTML
CSS FormatterBeautify or minify CSS
JavaScript FormatterBeautify or minify JS
PHP FormatterBeautify PHP code
Markdown to HTMLConvert with a live preview

AI tools

Token CounterTokens for every model
Prompt Secret ScrubberHide keys and personal data

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Time & date toolsConvert timestamps, read cron, compare zones.
Keys & IDsGenerate secure tokens, passwords and UUIDs.
Code formattersFormat SQL, HTML, CSS, JavaScript and PHP code.
AI toolsCount tokens and hide secrets before you prompt.
HomePopular tools and categories
All categoriesBrowse tools by category
AboutWhat ToolJar is and why
PrivacyWhat is and is not collected

Theme

Switch to light theme
Switch to dark theme