Security Tools

JWT Encoder & Signer

Build a JSON Web Token from a header and claims and sign it with HS256, RS256, PS256, ES256 or EdDSA using your own secret or private key, then verify it. To inspect an existing token use the JWT Decoder; for a random signing secret or key pair see the JWT Secret & Key Pair Generator.

Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. Tokens are signed with your browser's Web Crypto API: secrets and private keys never leave this page. Still, prefer test keys over production keys.

    Claim helpers

    Only filled-in fields are applied; edit the JSON to remove a claim. Times are Unix seconds (NumericDate).

    A JWK with "kty":"oct" is also accepted.
    Encoded token

    header . payload . signature · Paste it into the JWT Decoder to inspect it.

    Verify a token

    Checks the signature with the algorithm named in the token header and reports exp / nbf / iat. Use the secret for HS tokens, or a public key (PEM PUBLIC KEY, RSA PUBLIC KEY, certificate, JWK or JWKS) for the others.

    About JWT encoding and signing

    A JSON Web Token (RFC 7519) is three base64url segments joined by dots: a header naming the signing algorithm, a payload of claims, and a signature over the first two segments. Anyone can read the header and payload, so never put secrets in claims; the signature only proves the token was issued by someone holding the key and has not been changed since.

    HS256/384/512 use HMAC with a shared secret: the issuer and the verifier hold the same key, which should be random and at least as long as the hash (32, 48 or 64 bytes). RS and PS algorithms use an RSA private key to sign and the public key to verify, ES256/384/512 use ECDSA on the P-256, P-384 and P-521 curves (the JWS signature is the raw 64, 96 or 132-byte r||s value, not DER), and EdDSA uses Ed25519. Asymmetric algorithms let many services verify tokens without being able to create them.

    Private keys can be pasted as PKCS#8 (BEGIN PRIVATE KEY), PKCS#1 (BEGIN RSA PRIVATE KEY), SEC1 (BEGIN EC PRIVATE KEY) or JWK; PKCS#1 and SEC1 keys are wrapped into PKCS#8 locally because that is what the browser's Web Crypto API imports. The matching public key is shown in PEM and JWK form so you can configure the verifier. Unsigned tokens (alg: none) are deliberately not supported.

    For production, sign tokens on your server with a maintained library and keep lifetimes short with exp. When verifying, pin the expected algorithm instead of trusting the token's header, and check exp, nbf, iss and aud. Related tools: JWT Decoder, X.509 Certificate & CSR Decoder (inspect the certificate whose public key verifies your tokens), JWT Secret & Key Pair Generator, HMAC Generator and Unix Timestamp Converter.

    Frequently Asked Questions

    No. Tokens are signed and verified with your browser's built-in Web Crypto API, so secrets, private keys and tokens never leave the page. Even so, use test keys rather than production keys whenever you can.

    HS256, HS384 and HS512 (HMAC with a shared secret), RS256, RS384 and RS512 (RSA), PS256, PS384 and PS512 (RSA-PSS), ES256, ES384 and ES512 (ECDSA on P-256, P-384 and P-521) and EdDSA with Ed25519 when your browser supports it. The unsigned alg "none" is deliberately not supported.

    PKCS#8 PEM (BEGIN PRIVATE KEY), PKCS#1 PEM (BEGIN RSA PRIVATE KEY), SEC1 PEM (BEGIN EC PRIVATE KEY) and private JWKs. Password-protected and OpenSSH-format keys must be converted with openssl or ssh-keygen first. For verification you can use a public key PEM, an RSA PUBLIC KEY, an X.509 certificate, a JWK or a JWKS.

    RFC 7518 requires an HMAC key at least as long as the hash output: 32 bytes for HS256, 48 for HS384 and 64 for HS512. Short or human-chosen secrets can be brute-forced offline from a single token, and libraries such as jose reject them. Use the Generate random secret button for a strong one.

    JWS requires ECDSA signatures as the raw r and s values joined together (64 bytes for ES256), not the DER encoding that OpenSSL and Java produce by default. This tool always outputs the raw form and its verifier tells you when a signature looks DER-encoded.

    Not on its own. A server must also pin the expected algorithm instead of trusting the token header, and check exp, nbf, iss and aud. The verify section shows the time claims in readable form so you can spot expired or not-yet-valid tokens.