Simplify Your Workflow: Search MiniWebtool.
Add Extension
Related Tools
Atbash Cipher ToolJWT DecoderMorse Code GeneratorUUID Validator/DecoderVigenère Cipher Tool
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:

Random Name PickerRandom PickerInstagram User ID LookupImage ResizerLine CounterRelative Standard Deviation CalculatorFPS ConverterFacebook User ID LookupSort NumbersRemove SpacesMAC Address GeneratorWord to Phone Number ConverterBatting Average CalculatorERA CalculatorMAC Address LookupMercury Retrograde CalendarSlope and Grade CalculatorRandom Quote Generator📷 OCR / Image to Text⬛ Aspect Ratio CalculatorSum CalculatorFeet and Inches to Cm ConverterPercent Off CalculatorSun, Moon & Rising Sign Calculator 🌞🌙✨SHA256 Hash GeneratorInvisible Text GeneratorRandom Credit Card GeneratorMerge VideosAudio SplitterMaster Number CalculatorVertical Jump CalculatorRandom IMEI GeneratorMP3 LooperNumber of Digits CalculatorBitwise CalculatorLog Base 10 CalculatorOPS CalculatorLunar Calendar ConverterPhone Number ExtractorSalary Conversion CalculatorRandom Truth or Dare Generator🖱️ Click CounterSquare Root (√) CalculatorImage SplitterCm to Feet and Inches ConverterFile Size ConverterRandom Fake Address GeneratorRandom Superpower GeneratorRandom Poker Hand GeneratorCaffeine Overdose CalculatorRoman Numerals ConverterWeight Loss CalculatorCompound Growth CalculatorBattery Life CalculatorRandom Activity GeneratorYouTube Channel StatisticsOctal CalculatorBroken Link CheckerRandom Writing Prompt GeneratorSaturn Return CalculatorRandom Movie PickerWord Ladder GeneratorNumber to Word ConverterSun Position CalculatorText FormatterIP Subnet CalculatorStair CalculatorHalfway Date CalculatorRandom Birthday GeneratorCompare Two StringsRandom Meal GeneratorOn Base Percentage CalculatorAdd Text to ImageRandom Loadout GeneratorLong Division CalculatorSHA512 Hash GeneratorSlugging Percentage CalculatorDecimal to BCD ConverterArc Length CalculatorBinary to Gray Code ConverterYouTube Tag ExtractorBCD to Decimal ConverterVideo to Image ExtractorBcrypt Hash Generator / CheckerRandom Emoji GeneratorVideo CompressorGray Code to Binary ConverterWord Scramble GeneratorAPI TesterFirst n Digits of PiList of Prime NumbersAI Text Humanizer📅 Date CalculatorMartingale Strategy CalculatorEmail ExtractorRemove AccentPercent Growth Rate CalculatorWAR CalculatorBingo Card GeneratorCone Flat Pattern (Template) GeneratorRatio to Percentage CalculatorLeap Years ListBreak Line by CharactersFlip VideoTime Duration CalculatorBolt Torque CalculatorRandom User-Agent GeneratorConnect the Dots GeneratorDay of the Year Calculator - What Day of the Year Is It Today?Randomize NumbersName RandomizerProportion CalculatorDMS to Decimal Degrees ConverterHebrew Calendar ConverterCM to Inches ConverterQuotient and Remainder CalculatorAcreage CalculatorImage CompressorSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾Partition Function CalculatorMD5 Hash GeneratorPercent to PPM ConverterEffect Size CalculatorIP Address to Hex ConverterRandom Tournament Bracket GeneratorOutlier CalculatorBinary to BCD ConverterDecibel (dB) CalculatorModulo CalculatorNumber ExtractorMolarity CalculatorRemove Lines Containing...1099 Tax CalculatorRandom Number PickerAI Language DetectorWhat is my Zodiac Sign?Astrological Element Balance CalculatorMAC Address AnalyzerPercentage Increase CalculatorColor InverterJob FinderURL ExtractorRandom Group Generator🔍 Plagiarism CheckerLove Compatibility CalculatorName Number CalculatorSocial Media Username CheckerMultiple Fraction CalculatorBeer Chill Time Calculator💧 Dew Point CalculatorTrigonometric Equation SolverDay of Year CalendarYouTube Thumbnail Downloader🔊 Tone GeneratorVoronoi Diagram GeneratorAdd Prefix and Suffix to TextSum of Positive Integers CalculatorVideo SplitterSteel Weight CalculatorFirst n Digits of eSourdough CalculatorLED Resistor CalculatorWhat is my Lucky Number?WHIP CalculatorHeight Percentile CalculatorReverse VideoAmortization CalculatorHTML CompressorPercentile CalculatorWater Usage CalculatorDice RollerExponential Decay CalculatorRandom Time GeneratorSquare Numbers ListYouTube Comment PickerRandom US State GeneratorReverse TextPER CalculatorBlood Donation Time CalculatorMaze GeneratorPerfect Number CheckerRandom Chord GeneratorText to Speech ReaderBoiling Point Calculator🎰 Gacha Pity Calculator🎲 Loot Drop Probability CalculatorRandom Name GeneratorCube Numbers ListMandelbrot Set ExplorerRandom PIN GeneratorAdjust Video SpeedEstimation CalculatorBCD to Binary ConverterIP Address to Binary ConverterTwitter/X Timestamp ConverterTaco Bar CalculatorList RandomizerCollage MakerAI ParaphraserAI Punctuation AdderSort Lines AlphabeticallyHex to BCD ConverterLottery Number GeneratorBCD to Hex ConverterMedian CalculatorStandard Error CalculatorAverage CalculatorPVIFA CalculatorHypotenuse CalculatorRemove Audio from VideoActual Cash Value CalculatorScientific Notation to Decimal ConverterAngel Number CalculatorLog Base 2 CalculatorRoot Mean Square CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterConvolution CalculatorRandom String GeneratorRemove Leading Trailing SpacesMarkup CalculatorPVIF CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerCTR 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 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 CalculatorHeat Transfer CalculatorThermal Expansion CalculatorSpecific Heat Capacity CalculatorGear Ratio Calculator (Mechanical)Pulley System CalculatorHydraulic Cylinder Force CalculatorBelt Length CalculatorCloset Capsule CalculatorStorage Unit Size CalculatorMoving Box Quantity CalculatorGift Card Tip CalculatorGas vs Electric Cost ComparisonPrint Cost CalculatorHair Dye Mixing CalculatorLaundry Detergent Dosage CalculatorDishwasher Load OptimizerTile Grout CalculatorPaint Color Mixing CalculatorFlashcard Spaced Repetition SchedulerLearning Curve CalculatorCornell Notes GeneratorVocabulary Quiz GeneratorLanguage Learning Hours to Fluency CalculatorCollege Cost CalculatorScholarship ROI CalculatorAI Recipe Generator (From Ingredients)AI Gift Idea GeneratorAI Meal Plan GeneratorAI Workout Plan GeneratorAI Reading List GeneratorAI Travel Itinerary GeneratorAI Excuse Generator (Polite)AI Apology Letter WriterAI Unit Converter (Natural Language)AI Resume / CV AnalyzerAI Text Tone AnalyzerAI Data Visualizer (Paste CSV)AI Regex GeneratorAI SQL Query GeneratorPaycheck Calculator (Take-Home Pay)VA Loan CalculatorARM Mortgage CalculatorBiweekly Mortgage Payment CalculatorPMI CalculatorMortgage Points CalculatorBalloon Loan CalculatorInterest-Only Mortgage CalculatorConstruction Loan CalculatorLand Loan CalculatorBoat Loan CalculatorRV Loan CalculatorMotorcycle Loan CalculatorCar Affordability CalculatorOut-the-Door Price CalculatorRent Affordability CalculatorProrated Rent CalculatorRent Increase CalculatorMileage Reimbursement CalculatorPer Diem CalculatorInvoice GeneratorSalary Raise CalculatorSeverance Pay CalculatorHSA Calculator529 College Savings CalculatorI Bond CalculatorT-Bill CalculatorCD Ladder CalculatorCredit Utilization CalculatorLoan Comparison CalculatorGross-Up CalculatorSWP CalculatorRD CalculatorPPF CalculatorEPF CalculatorNPS CalculatorGratuity CalculatorHRA Exemption CalculatorUK Stamp Duty CalculatorZakat CalculatorTithe CalculatorBetting Odds ConverterPayPal Fee CalculatorStripe Fee CalculatorEtsy Fee CalculatoreBay Fee CalculatorAmazon FBA CalculatorShopify Profit CalculatorWholesale Price CalculatorCraft Pricing CalculatorDepreciation CalculatorEOQ CalculatorReorder Point CalculatorSafety Stock CalculatorFIFO / LIFO CalculatorContribution Margin CalculatorWorking Capital CalculatorCost Per Lead CalculatorEmail Marketing ROI CalculatorTip Pooling CalculatorWeek Number CalculatorAnniversary CalculatorHalf Birthday CalculatorSobriety CalculatorRetirement CountdownDate to Roman Numerals ConverterSunrise & Sunset CalculatorMoon Phase CalculatorNap CalculatorWorld ClockJulian Date ConverterISO 8601 Date FormatterChinese Gender PredictorImplantation CalculatorIVF Due Date CalculatorhCG Doubling Time CalculatorChild Height PredictorChild BMI Percentile CalculatorBaby Eye Color PredictorBaby Name GeneratorDiaper Size CalculatorBaby Milk Intake CalculatorCost of Raising a Child CalculatorEasy Grader (EZ Grader)CGPA to Percentage ConverterSAT Score CalculatorACT Score CalculatorAP Score CalculatorAttendance Percentage CalculatorPercentage to CGPA ConverterCitation Generator (APA/MLA/Chicago)AI Quiz GeneratorAI Lesson Plan GeneratorInteractive Periodic TableElectron Configuration CalculatorLimiting Reactant CalculatorTheoretical Yield CalculatorHenderson-Hasselbalch CalculatorpKa to Ka ConverterMolality CalculatorNormality CalculatorPercent Composition CalculatorFreezing Point Depression CalculatorBoiling Point Elevation CalculatorOsmotic Pressure Calculator