Simplify Your Workflow: Search MiniWebtool.
Add Extension
See also
JWT DecoderAI Token CounterJSON to CSV ConverterAI Regex GeneratorInclusion-Exclusion Calculator
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

Encoders And Decoders:

Top & Updated:

Instagram User ID LookupRandom PickerRandom Name Picker WheelImage ResizerFacebook User ID LookupLine CounterRSD Calculator - Relative Standard DeviationSort NumbersFPS ConverterMAC Address GeneratorRemove SpacesWord to Phone Number ConverterSun, Moon & Rising Sign Calculator ๐ŸŒž๐ŸŒ™โœจ๐Ÿ“ท OCR / Image to Textโฌ› Aspect Ratio CalculatorRandom Quote GeneratorERA CalculatorMAC Address Lookup๐Ÿ–ฑ๏ธ Click CounterSquare Root (โˆš) CalculatorMerge VideosSlope and Grade CalculatorJob FinderPercent Off CalculatorSum CalculatorWeight Loss CalculatorSHA256 Hash GeneratorBatting Average CalculatorCm to Feet and Inches ConverterRandom Truth or Dare GeneratorMP3 LooperRandom Poker Hand GeneratorAdd Text to ImageVertical Jump CalculatorRandom Credit Card GeneratorRoman Numerals ConverterNumber of Digits CalculatorAudio SplitterRandom Fake Address GeneratorRandom IMEI GeneratorLog Base 10 CalculatorInvisible Text GeneratorFeet and Inches to Cm ConverterRandom Birthday GeneratorPhone Number ExtractorBitwise CalculatorJulian Date ConverterImage SplitterRandom Superpower GeneratorRandom Writing Prompt GeneratorSalary Conversion CalculatorNumber to Word ConverterSun Position CalculatorName RandomizerText FormatterLunar Calendar ConverterRandom Activity GeneratorCaffeine Overdose CalculatorIP Subnet CalculatorOctal CalculatorHalfway Date CalculatorBCD ConvertereBay Fee CalculatorCompound Growth CalculatorRandom Movie PickerBolt Torque CalculatorLong Division CalculatorFile Size ConverterBinary to Gray Code ConverterImage CompressorYouTube Channel StatisticsWord Ladder GeneratorQuotient and Remainder CalculatorEmail ExtractorStair CalculatorSHA512 Hash GeneratorOutlier CalculatorRandom Meal GeneratorVideo CompressorHebrew Calendar ConverterLeap Years ListFirst n Digits of PiOPS CalculatorBCD to Decimal ConverterWAR CalculatorRandom Loadout GeneratorBreak Line by CharactersList of Prime NumbersMultiplication CalculatorStandard Error CalculatorBcrypt Hash Generator / Checker๐Ÿ“… Date CalculatorSlugging Percentage Calculator๐Ÿ” Plagiarism CheckerAPI TesterMD5 Hash GeneratorRandomize NumbersAI Language DetectorURL ExtractorFlip VideoDMS to Decimal Degrees ConverterMaster Number CalculatorBroken Link CheckerCompare Two StringsMultiple Fraction CalculatorRandom Number Picker๐ŸŽฐ Gacha Pity CalculatorAstrological Element Balance Calculator๐Ÿ”Š Tone GeneratorArc Length CalculatorVideo to Image ExtractorEstimation CalculatorIP Address to Hex ConverterWhat is my Zodiac Sign?Add Prefix and Suffix to TextIs it a Prime Number?Percent to PPM ConverterRandom Emoji GeneratorRemove AccentSocial Media Username CheckerBingo Card GeneratorNumber ExtractorOn Base Percentage CalculatorPercent Growth Rate CalculatorRandom Tournament Bracket GeneratorTime Duration CalculatorDay of the Year Calculator - What Day of the Year Is It Today?Cone Flat Pattern (Template) GeneratorLottery Number GeneratorName Number CalculatorAcreage CalculatorBattery Life CalculatorDay of Year CalendarLED Resistor CalculatorModulo CalculatorRatio CalculatorList RandomizerSocial Media Post Time OptimizerGray Code to Binary ConverterRandom Math Problem GeneratorRandom User-Agent GeneratorVideo SplitterRatio to Percentage CalculatorYouTube Tag ExtractorRandom Chord GeneratorSmall Text Generator โฝแถœแต’แต–สธ โฟ แต–แตƒหขแต—แต‰โพWord Scramble GeneratorIP Address to Binary ConverterChinese Gender PredictorDecibel (dB) CalculatorRandom Video Thumbnail GeneratorSquare Numbers ListConnect the Dots GeneratorMercury Retrograde CalendarImage CropperSaturn Return CalculatorFraction CalculatorRemove Line BreaksProportion CalculatorOrder of Operations Calculator (PEMDAS)Random PIN GeneratorScientific Notation to Decimal ConverterRandom Line PickerMagic 8-Ball๐Ÿ“Š Bar Graph MakerLove Compatibility CalculatorText Case ConverterColor InverterAdjust Video SpeedFirst n Digits of eWhat is my Lucky Number?Random Excuse GeneratorBinary to BCD Converter๐Ÿ’ง Dew Point CalculatorImage EnhancerRadical SimplifierTaco Bar CalculatorLbs to Kg ConverterPER CalculatorTrigonometric Equation SolverPregnancy CalendarReverse VideoHeight Percentile CalculatorBackronym GeneratorMcg to Mg ConverterPaycheck Calculator (Take-Home Pay)Random Object GeneratorWHIP CalculatorAmortization CalculatorGolden Ratio CalculatorAngel Number CalculatorInvisible Character RemoverWhitespace VisualizerAI Text HumanizerCrossword Puzzle MakerHTML CompressorParabola CalculatorRandom Chess Opening GeneratorAI ParaphraserAI Punctuation AdderSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorAverage CalculatorPVIFA CalculatorHypotenuse CalculatorRemove Audio from VideoActual Cash Value CalculatorLog Base 2 CalculatorRoot Mean Square CalculatorSum of Positive Integers CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderHex to Decimal ConverterRandom Group GeneratorConvolution CalculatorMAC Address AnalyzerRandom String GeneratorRemove Leading Trailing SpacesMarkup CalculatorPVIF 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 CalculatorCTR 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 CalculatorBernoulli Equation CalculatorSurfboard Volume CalculatorTennis Grip Size CalculatorBackpack Size CalculatorCelsius to Fahrenheit ConverterFahrenheit to Celsius ConverterKm to Miles ConverterMiles to Km ConverterMM to Inches ConverterInches to MM ConverterStone to Kg ConverterKg to Stone ConverterLiters to Gallons ConverterGallons to Liters ConverterML to Oz ConverterOz to ML ConverterSquare Meters to Square Feet ConverterSquare Feet to Square Meters ConverterCubic Feet to Cubic Yards ConverterCubic Meters to Cubic FeetKnots to MPH ConverterMPH to KMH / KMH to MPHMg to Ml ConverterAI Text SummarizerAI TranslatorAI Story GeneratorAI Poem GeneratorAI Song Lyrics GeneratorIndian Land Unit ConverterTola to Gram ConverterPX to REM ConverterPT to PX ConverterMerge PDFSplit PDFCompress PDFPDF to JPGJPG to PDFRotate PDFDelete PDF PagesAdd Page Numbers to PDFProtect PDFReorder PDF PagesPDF Word CounterPDF Page ExtractorPDF to Text ExtractorUnlock PDF (Owner-Password Removal)PDF Flatten ToolAI Rap Lyrics GeneratorAI Cover Letter GeneratorAI Resume Bullet GeneratorAI LinkedIn Headline & Bio GeneratorAI Instagram Caption GeneratorAI YouTube Title & Description GeneratorAI Video Script GeneratorAI Product Description GeneratorAI Press Release GeneratorAI Wedding Speech GeneratorAI Thank-You Note GeneratorAI Dream InterpreterRandom Question GeneratorWould You Rather GeneratorNever Have I Ever GeneratorIcebreaker Question GeneratorCharades GeneratorPictionary Word GeneratorHangman Word GeneratorTrivia Question GeneratorRandom Fact GeneratorRandom Joke GeneratorDad Joke GeneratorPickup Line GeneratorCompliment GeneratorDaily Affirmation GeneratorJournal Prompt GeneratorDrawing Idea GeneratorFortune Cookie GeneratorFantasy Name GeneratorCapacitor Bank Sizing CalculatorSolar Charge Controller Sizing CalculatorBattery C-Rate CalculatorBattery Internal Resistance CalculatorPeukert Battery Runtime CalculatorWire Resistance CalculatorPCB Via Current CalculatorBand Name GeneratorRap Name GeneratorNickname GeneratorTeam Name GeneratorGamertag Generator