Simplify Your Workflow: Search MiniWebtool.
Add Extension
> 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// from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 26, 2026

Top & Updated:

Random PickerRandom Name PickerBatting Average CalculatorLine CounterRelative Standard Deviation CalculatorFPS ConverterSort NumbersERA CalculatorMAC Address GeneratorRemove SpacesInstagram User ID LookupWord to Phone Number ConverterFacebook User ID LookupFeet and Inches to Cm ConverterMAC Address LookupRandom Truth or Dare GeneratorRandom Quote GeneratorSum CalculatorPercent Off CalculatorBitwise CalculatorSHA256 Hash GeneratorOPS CalculatorUpgrade to Pro or PremiumMP3 LooperSlugging Percentage CalculatorLog Base 10 CalculatorSlope and Grade CalculatorNumber of Digits CalculatorAudio SplitterPhone Number ExtractorSquare Root (√) CalculatorSaturn Return CalculatorMerge VideosRoman Numerals ConverterSun, Moon & Rising Sign Calculator 🌞🌙✨Vertical Jump CalculatorSalary Conversion CalculatorRandom IMEI GeneratorOn Base Percentage CalculatorOctal CalculatorVideo to Image ExtractorCm to Feet and Inches ConverterWAR CalculatorCompound Growth CalculatorDecimal to BCD ConverterRandom Writing Prompt GeneratorRandom Activity GeneratorFirst n Digits of PiRandom Poker Hand GeneratorBCD to Decimal ConverterCompare Two StringsWHIP CalculatorBinary to Gray Code ConverterOutlier CalculatorCaffeine Overdose CalculatorRandom Fake Address GeneratorTime Duration CalculatorAI ParaphraserAdd Prefix and Suffix to TextYouTube Channel StatisticsRandom Movie PickerNumber to Word ConverterText FormatterFile Size ConverterVideo CropperPER CalculatorBinary to BCD ConverterRandom Superpower GeneratorRemove AccentDay of Year CalendarRemove Leading Trailing SpacesCM to Inches ConverterLove Compatibility CalculatorRandom Loadout GeneratorVideo SplitterWhat is my Lucky Number?Gray Code to Binary ConverterWord Ladder GeneratorSocial Media Username CheckerImage SplitterImage CompressorInvisible Text GeneratorPercent Growth Rate CalculatorReverse VideoQuotient and Remainder CalculatorRandom Birthday GeneratorAdd Text to ImageIP Address to Hex ConverterStair CalculatorLeap Years ListAI Punctuation AdderMartingale Strategy CalculatorSHA512 Hash GeneratorDay of the Year Calculator - What Day of the Year Is It Today?Grade CalculatorImage ResizerConnect the Dots GeneratorRandom Object GeneratorArc Length CalculatorEmail ExtractorURL ExtractorList of Prime NumbersVideo CompressorSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterLottery Number GeneratorBCD to Hex ConverterMedian CalculatorStandard Error CalculatorList RandomizerBreak Line by CharactersAverage CalculatorModulo CalculatorPVIFA CalculatorHypotenuse 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 GeneratorAmortization 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 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 CalculatorBoiling Point CalculatorTitration CalculatorMole/Gram/Particle ConverterLED Resistor CalculatorVoltage Divider CalculatorParallel Resistor CalculatorCapacitor Calculator555 Timer CalculatorWire Gauge CalculatorTransformer CalculatorRC Time Constant CalculatorPower Factor CalculatorDecibel (dB) CalculatorImpedance CalculatorResonant Frequency CalculatorFinal Grade CalculatorWeighted Grade CalculatorTest Score CalculatorSignificant Figures CalculatorStudy Timer (Pomodoro)Long Division CalculatorRounding CalculatorCompleting the Square CalculatorRatio Calculatorp-Value CalculatorNormal Distribution CalculatorPercentile CalculatorFive Number Summary CalculatorCross Multiplication CalculatorLumber CalculatorRebar CalculatorPaver CalculatorInsulation CalculatorHVAC Sizing CalculatorRetaining Wall CalculatorCarpet CalculatorSquare Footage Calculator⏱️ Countdown Timer⏱️ Online Stopwatch⏱️ Hours Calculator🕐 Military Time Converter📅 Date Difference Calculator⏰ Time Card Calculator⏰ Online Alarm Clock🌐 Time Zone Converter🌬️ Wind Chill Calculator🌡️ Heat Index Calculator💧 Dew Point CalculatorFuel Cost CalculatorTire Size Calculator👙 Bra Size Calculator🌍 Carbon Footprint Calculator⬛ Aspect Ratio CalculatorOnline Notepad🖱️ Click Counter🔊 Tone Generator📊 Bar Graph Maker🥧 Pie Chart Maker📈 Line Graph Maker📷 OCR / Image to Text🔍 Plagiarism Checker🚚 Moving Cost Estimator❄️ Snow Day Calculator🎮 Game Sensitivity Converter⚔️ DPS Calculator🎰 Gacha Pity Calculator🎲 Loot Drop Probability Calculator🎮 In-Game Currency ConverterMultiplication Table GeneratorLong Multiplication CalculatorLong Addition and Subtraction CalculatorOrder of Operations Calculator (PEMDAS)Place Value Chart GeneratorNumber Pattern FinderEven or Odd Number CheckerAbsolute Value CalculatorCeiling and Floor Function CalculatorUnit Rate CalculatorSkip Counting GeneratorNumber to Fraction ConverterEstimation CalculatorCubic Equation SolverQuartic Equation SolverLogarithmic Equation SolverExponential Equation SolverTrigonometric Equation SolverLiteral Equation SolverRational Equation SolverSystem of Nonlinear Equations SolverPoint-Slope Form CalculatorStandard Form to Slope-Intercept ConverterEquation of a Line CalculatorParallel and Perpendicular Line CalculatorDescartes' Rule of Signs CalculatorRational Root Theorem CalculatorSigma Notation Calculator (Summation)Product Notation Calculator (Pi Notation)Pascal's Triangle GeneratorBinomial Theorem Expansion CalculatorParabola CalculatorHyperbola CalculatorConic Section IdentifierRegular Polygon CalculatorIrregular 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