Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Miscellaneous > Encoders And Decoders > JWT Generator

JWT Generator

Generate signed JSON Web Tokens (JWT) with custom header, payload claims, and HMAC signing algorithms (HS256/HS384/HS512). Includes quick claim presets, expiry helper, live token preview, and a visual breakdown of the three JWT segments.

JWT Generator
🔑 Signing Algorithm
👁 Live token preview

Embed JWT Generator Widget

About JWT Generator

Welcome to the JWT Generator, a fast and free online tool for creating signed JSON Web Tokens. Whether you are testing an authentication flow, building an API, debugging an integration, or learning how JWTs work under the hood, this generator gives you full control over the token header, payload claims, and HMAC signing algorithm. Output a valid HS256, HS384, or HS512 token in one click and inspect every segment side by side.

What Is a JSON Web Token?

A JSON Web Token (JWT) is a compact, URL-safe credential format defined by RFC 7519. A JWT carries claims about a subject between two parties and proves its integrity through a cryptographic signature. Because the token is self-contained, the receiver can validate it without calling back to the issuer — a property that makes JWTs the backbone of stateless authentication for modern web and mobile applications.

Every JWT is built from three base64url-encoded parts joined with dots:

  • Header — a JSON object that declares the token type (typ) and the signing algorithm (alg).
  • Payload — a JSON object that holds the claims, such as the user id, expiration time, and any custom data.
  • Signature — an HMAC or RSA signature over the encoded header and payload that protects them from tampering.
Token shape: base64url(header).base64url(payload).base64url(signature)
Example: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0In0.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

How the JWT Generator Works

This tool follows the exact JWT signing recipe from RFC 7519 §7.1:

  1. Serialize the header JSON to its compact form (no whitespace) and base64url-encode it.
  2. Do the same for the payload JSON.
  3. Concatenate the two with a dot separator. This is the signing input.
  4. Compute the HMAC of the signing input using your secret and the chosen SHA-2 algorithm.
  5. Base64url-encode the resulting signature bytes.
  6. Concatenate everything as header.payload.signature.

What Makes This Generator Different

  • Three-segment color visualization — header (rose), payload (purple), signature (cyan) so you can spot each part instantly.
  • Quick Claims palette — one-click insertion of iss, sub, aud, iat, nbf, and jti.
  • Expiry helper — preset buttons for 1 hour, 1 day, 7 days, or 30 days that compute the correct Unix timestamp automatically.
  • Live token preview — the encoded header and payload update as you type so you can see how each edit changes the token.
  • Smart header sync — switching algorithm updates the alg field of the header automatically.
  • Base64 secret toggle — if your secret is stored as base64 (the JWS convention for binary keys), enable the option and the tool decodes it before signing.
  • Per-segment copy buttons — copy the header, payload, signature, or full token independently.
  • Claim summary — recognized standard claims are listed with a description and a human-readable timestamp where applicable.

Choosing the Right Algorithm

The three HMAC variants this tool supports are functionally identical except for the underlying SHA-2 hash and signature length:

  • HS256 — HMAC with SHA-256. 256-bit signature. The default for almost every JWT-issuing library and the most widely interoperable choice.
  • HS384 — HMAC with SHA-384. 384-bit signature. Slightly larger margin against future cryptanalysis.
  • HS512 — HMAC with SHA-512. 512-bit signature. Useful when policy requires the longest standard hash.

All three rely on a shared secret that both the signer and verifier hold. RFC 7518 §3.2 requires the key to be at least as long as the hash output: 256 bits for HS256, 384 bits for HS384, 512 bits for HS512.

Security warning: never paste a real production secret into any online tool, including this one. Use this generator for learning, testing, and debugging with throwaway secrets only. For production tokens, sign on your own server with a vetted JWT library and keep the secret in a secrets manager such as AWS Secrets Manager, HashiCorp Vault, or Google Secret Manager.

Standard Registered Claims

RFC 7519 §4.1 defines a small set of standard claims that JWT issuers and verifiers should recognize. They are all optional but widely supported:

  • iss (issuer) — identifies who created the token. Often a URL or service name.
  • sub (subject) — identifies who the token is about, typically a user id.
  • aud (audience) — identifies the recipient the token is intended for. May be a single string or an array.
  • exp (expiration time) — Unix timestamp after which the token must be rejected.
  • nbf (not before) — Unix timestamp before which the token must not be accepted.
  • iat (issued at) — Unix timestamp recording when the token was created.
  • jti (JWT ID) — a unique identifier that allows tokens to be revoked or tracked individually.

How to Use This Tool

  1. Choose a signing algorithm — click HS256, HS384, or HS512. The header is updated automatically to match.
  2. Edit the header (optional) — the default header contains alg and typ. Add a custom kid (key id) if your verifier needs one.
  3. Build the payload — type your claims as JSON or click the Quick Claims buttons to insert standard fields. The expiry helper writes a correct Unix timestamp for the relative duration you choose.
  4. Set the secret — enter your HMAC shared secret. Toggle the eye icon to reveal it. If your secret is base64-encoded, enable the checkbox so the tool decodes it before signing.
  5. Generate the JWT — click Generate JWT. The full token, the three segment cards, the structure diagram, and the recognized-claim summary are rendered together.
  6. Copy what you need — use the per-segment Copy buttons or the Copy Token button to take the encoded value into Postman, curl, or your client app.

Common Use Cases

Authentication and Authorization

  • Issue access tokens after a successful login.
  • Encode user identity (sub) plus role or permission claims.
  • Sign short-lived tokens (15–60 minutes) and refresh them as needed.

API Integration Testing

  • Build mock tokens to test how your API responds to expired, future-dated, or malformed claims.
  • Generate fixture JWTs for unit tests and CI pipelines.
  • Reproduce production-like tokens in a local environment without hitting the real auth server.

Single Sign-On (SSO) Debugging

  • Compare a known-good JWT to one your provider is sending to find spec drift.
  • Check the signing algorithm and key id (kid) used by an upstream issuer.

Frequently Asked Questions

Is the JWT created here a real, valid token?

Yes. The token is signed with HMAC over the canonical encoded header and payload. Any JWT library that uses your same secret will validate it successfully.

Why does my token look identical to what I generate elsewhere?

Because JWTs are deterministic: given the same header, payload, and secret, every conformant library produces the exact same string. If you see a difference, check that the JSON serialization order, key spelling, and secret encoding all match.

Can I decode a JWT to verify what I generated?

Yes. Pair this tool with a JWT decoder to inspect the segments. Decoding only reverses the base64url step — verifying the signature still requires the secret.

Why is my secret rejected as too short?

RFC 7518 recommends a key of at least the hash output length: 256 bits for HS256. The tool itself does not enforce a minimum, but a well-behaved verifier may reject short keys. Use a randomly generated 32+ byte secret in real use.

Does this tool support RS256, ES256, or EdDSA?

Not yet — this tool focuses on HMAC-based algorithms because they need only a shared string. Asymmetric algorithms (RS*, PS*, ES*, EdDSA) require key pairs and PEM handling that are better suited to dedicated tooling.

Are my secret and payload sent to the server?

The form is submitted over HTTPS to compute the signature. Nothing is logged or stored beyond the lifetime of the request. Do not enter production secrets here regardless — treat it as a public testing environment.

Additional Resources

Reference this content, page, or tool as:

"JWT Generator" at https://MiniWebtool.com/jwt-generator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 26, 2026

Related MiniWebtools:

Encoders And Decoders:

Top & Updated:

Random PickerRandom Name PickerLine CounterRelative Standard Deviation CalculatorBatting Average CalculatorFPS ConverterSort NumbersJob FinderERA CalculatorInstagram User ID LookupMAC Address GeneratorRemove SpacesWord to Phone Number ConverterMAC Address LookupFacebook User ID LookupFeet and Inches to Cm ConverterRandom Truth or Dare GeneratorSum CalculatorOPS CalculatorPercent Off CalculatorSHA256 Hash GeneratorSquare Root (√) CalculatorLog Base 10 CalculatorNumber of Digits CalculatorBitwise CalculatorSlope and Grade CalculatorMP3 LooperVertical Jump CalculatorSalary Conversion CalculatorAudio SplitterRandom Letter GeneratorPhone Number ExtractorOn Base Percentage CalculatorRandom IMEI GeneratorRandom Quote GeneratorNumber to Word ConverterSlugging Percentage CalculatorImage ResizerRoman Numerals ConverterAI Text HumanizerCaffeine Overdose CalculatorRandom Poker Hand GeneratorSun, Moon & Rising Sign Calculator 🌞🌙✨Merge VideosSaturn Return CalculatorCompound Growth CalculatorCm to Feet and Inches ConverterGrade CalculatorDecimal to BCD ConverterRandom Writing Prompt GeneratorRandom Birthday GeneratorRandom Activity GeneratorVideo to Image ExtractorBCD to Decimal ConverterRandom Movie PickerRandom Fake Address GeneratorText FormatterRandom Object GeneratorWAR CalculatorFirst n Digits of PiInvisible Text GeneratorRandom Superpower GeneratorBingo Card GeneratorWHIP CalculatorBinary to Gray Code ConverterLove Compatibility CalculatorRandom Loadout GeneratorCompare Two StringsOctal CalculatorFile Size ConverterRandom Time GeneratorRemove AccentTime Duration CalculatorWord Ladder GeneratorAdd Prefix and Suffix to TextRandom Credit Card GeneratorYouTube Channel StatisticsPercent Growth Rate CalculatorMaster Number CalculatorCryptogram GeneratorCM to Inches ConverterOutlier CalculatorList of Prime Numbers⬛ Aspect Ratio CalculatorDay of Year CalendarUnit Rate CalculatorImage SplitterBinary to BCD ConverterQuotient and Remainder CalculatorDay of the Year Calculator - What Day of the Year Is It Today?Leap Years ListPER CalculatorArc Length CalculatorStair CalculatorRandom Chess Opening GeneratorExponential Decay CalculatorGray Code to Binary ConverterProportion CalculatorTrigonometric Equation SolverDoubling Time CalculatorAI Punctuation AdderEmail ExtractorURL ExtractorAI ParaphraserSHA512 Hash GeneratorVideo CompressorIP Address to Hex ConverterSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterLottery Number GeneratorBCD to Hex ConverterMedian CalculatorStandard Error CalculatorList RandomizerBreak Line by CharactersAverage CalculatorModulo CalculatorPVIFA CalculatorReverse VideoHypotenuse CalculatorRemove Audio from VideoActual Cash Value CalculatorScientific Notation to Decimal ConverterNumber ExtractorAngel Number CalculatorLog Base 2 CalculatorRoot Mean Square CalculatorSum of Positive Integers CalculatorSHA3-256 Hash GeneratorAI Sentence Expander📅 Date CalculatorLbs to Kg ConverterHex to Decimal ConverterRandom Group GeneratorConvolution CalculatorMAC Address AnalyzerRandom String GeneratorRemove Leading Trailing SpacesAmortization CalculatorMarkup CalculatorPVIF CalculatorName Number CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerSocial Media Username CheckerCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorBoiling Point CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorRelative Risk CalculatorEffect Size CalculatorPermutations with Repetition CalculatorModular Exponentiation CalculatorPrimitive Root CalculatorPerfect Number CheckerAmicable Number CheckerTwin Prime FinderMersenne Prime CheckerGoldbach Conjecture VerifierMöbius Function CalculatorEgyptian Fraction CalculatorFibonacci Number CheckerDigital Root CalculatorPartition Function CalculatorBoolean Algebra SimplifierKarnaugh Map (K-Map) SolverLogic Gate SimulatorGraph Coloring CalculatorTopological Sort CalculatorAdjacency Matrix CalculatorRecurrence Relation SolverInclusion-Exclusion CalculatorLinear Programming SolverTraveling Salesman Solver (TSP)Hamiltonian Path CheckerPlanar Graph CheckerNetwork Flow Calculator (Max Flow)Stable Marriage Problem SolverFirst-Order ODE SolverSecond-Order ODE SolverDirection Field / Slope Field PlotterEuler's Method CalculatorBernoulli ODE SolverSystem of ODEs SolverGroup Theory Order CalculatorRing and Field CalculatorJordan Normal Form CalculatorMatrix Exponential CalculatorTensor Product CalculatorFast Fourier Transform (FFT) CalculatorZ-Transform CalculatorNumerical Integration CalculatorTOML to JSON ConverterJSON to CSV ConverterXML to JSON ConverterSQL to MongoDB Query ConverterCSS Flexbox PlaygroundCSS Grid GeneratorJWT GeneratorBcrypt Hash Generator / CheckerColor Code Converter (All Formats)Git Command Generator.env File GeneratorLorem Picsum / Placeholder Image GeneratorText to Binary/Hex/ASCII ConverterSyllable CounterSentence CounterParagraph CounterSpeaking Time CalculatorReading Time CalculatorWhitespace VisualizerStrikethrough Text GeneratorTorque Converter (Nm, ft-lb, kgf-cm)Data Transfer Rate ConverterFuel Efficiency ConverterAstronomical Unit ConverterRing Size ConverterPaper Size ReferenceClothing Size ConverterGas Mileage CalculatorEV Range CalculatorEV Charging Time Calculator0–60 / Quarter Mile CalculatorCar Lease CalculatorVehicle Towing Capacity CalculatorExposure Triangle CalculatorCrop Factor CalculatorMegapixel to Print Size CalculatorPhoto File Size EstimatorMusic BPM TapperMusic Key TransposerVideo Bitrate CalculatorSeed Germination Rate CalculatorFertilizer Calculator (NPK)Raised Bed Soil CalculatorFrost Date CalculatorLawn Fertilizer CalculatorCompost Calculator (C:N Ratio)Solar Panel CalculatorSolar ROI CalculatorHome Energy Audit CalculatorAppliance Energy Cost CalculatorWater Usage CalculatorElectricity Generation Cost CalculatorHeat Loss CalculatorFlight Distance CalculatorTravel Budget CalculatorJet Lag CalculatorPacking List GeneratorTip Splitter (Advanced)Lease vs Buy CalculatorHourly Rate Calculator (Freelancer)Invoice Late Fee CalculatorESPP CalculatorStock Split CalculatorOptions Probability CalculatorDollar to Gold ConverterBeam Load CalculatorPipe Flow CalculatorBolt Torque CalculatorSteel Weight CalculatorGravel, Sand & Topsoil CalculatorRandom Sentence GeneratorRandom Paragraph GeneratorRandom Math Problem GeneratorRandom Bible Verse GeneratorRandom Cat/Dog Name GeneratorRandom Debate Topic GeneratorBody Recomposition CalculatorAlcohol Calorie CalculatorMedication Dosage CalculatorPace to Calories CalculatorHydration CalculatorTrain Meeting Problem SolverAge Word Problem SolverMixture Problem SolverWork Rate Problem SolverDistance-Speed-Time Triangle CalculatorCoin Word Problem SolverNumber Bonds GeneratorCarry and Borrow VisualizerTimes Tables QuizMental Math TrainerRoman Numeral Math SolverEgyptian Multiplication CalculatorVedic Math Tricks CalculatorRussian Peasant MultiplicationSoroban Abacus SimulatorAnnuity Payout CalculatorReverse Mortgage CalculatorVariable Annuity CalculatorFixed Indexed Annuity CalculatorBond Convexity CalculatorBond Duration Calculator (Macaulay & Modified)Forward Rate CalculatorMortgage Recast CalculatorTreasury Inflation-Protected Securities (TIPS) CalculatorStock Beta CalculatorTreynor Ratio CalculatorSortino Ratio CalculatorDoppler Effect CalculatorSpring Constant CalculatorPendulum Period Calculator