Skip to content
gohacks.dev
Security

JWT RS256 and ES256 Signer

Sign a JWT with RS256, RS512, PS256, ES256, ES384 or EdDSA using a private key in your browser, verify a token with a public key, and get the JWKS to publish.

Free · No sign-up · Your inputs stay in your browser

Input

Sign and verify JWTs with RSA, ECDSA or EdDSA

Output

Generate or paste a key

Asymmetric JWTs let any service verify a token with the public key while only the issuer holds the private one, which is why identity providers publish a JWKS rather than share a secret. Pin the algorithm on the verifying side: libraries that read alg from the token have accepted none and HS256-with-the-public-key forgeries. Ed25519 needs a recent browser.

Runs in this browser. Nothing you paste is sent to a server.

Asymmetric tokens

With HS256 every service that verifies a token holds the secret that can mint one. With RS256 or ES256 only the issuer holds the private key, and any service can verify with the public key, fetched from a JWKS endpoint that lets keys rotate by kid. The algorithms are registered in RFC 7518 and EdDSA in RFC 8037.

Pin the algorithm

Verifiers that trust the alg in the token header have accepted alg none, and HS256 tokens signed with the public key as an HMAC secret. Always tell the library which algorithm to expect.

Share

Frequently asked questions

What is the difference between RS256 and ES256?
Both are asymmetric. RS256 uses RSA with SHA-256 and has larger keys and signatures; ES256 uses ECDSA on P-256 with much smaller keys and signatures and faster signing.
How do I convert my RSA private key to PKCS#8?
openssl pkcs8 -topk8 -nocrypt -in rsa.key -out pkcs8.key turns a BEGIN RSA PRIVATE KEY file into BEGIN PRIVATE KEY, which Web Crypto imports.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools