Skip to content

JWT Generator

Runs in your browser

Edit the claims, pick an algorithm and a secret. The token re-signs as you type.

Header

alg is always set from the menu, so the header can’t disagree with the signature.

Payload

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 HMAC using the secret and algorithm you choose, via the browser’s WebCrypto, and the signature is appended as the third part.

The quick buttons write iat and exp as seconds from now, which is what JWT libraries expect. Open the result in the decoder to inspect it — the token and secret carry over.

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.
Why only HS256, HS384 and HS512?
Those use a shared secret, which is simple to type. RS and ES algorithms need a private key in PEM or JWK form; they may arrive in a later tool.
Is the secret stored anywhere?
No. It lives in this page’s memory while the tab is open and is never written to storage or sent over the network.

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

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 → CSVFlatten JSON into rows
CSV → JSONTurn rows back into objects

JWT tools

JWT DecoderRead header, payload, claims
JWT VerifierCheck an HMAC signature
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Code formatters

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

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Code formattersBeautify and minify SQL, HTML, CSS and JavaScript.
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