Fake JWK Generator
Generates a fake JSON Web Key object for testing JWT and key-handling code
Generated 14 words · 449 characters
See 3 examples
- Example 1
{ "kty": "RSA", "use": "sig", "alg": "RS256", "kid": "vaP3bYHwnYWvvPMX", "n": "-y5S4WSx5aYSPKgre5wpEeSa2KumoZKnPevnG9a6Fc6fqKX_FaLLZ_7129Piot98Qp52mkjOf6dGyY1MUmI362DE1mW9w1VDIoh14GYJcTDlXPJ7ajgYX9EoQSMbW6rsvbZvWoWrSwbXkXWKclLc359AUr0Jv7J1UPenNUw0DCNBhB1BB7kIFkbW92DH-l6zGslc7TpRikOGLbb1xtKYQB036kaAzhJejz-gYYwUxqqMYxkVQGkaScv2VC7ZLXRZ8fbD8_YrKrkCeysYVnpFM3on0dWpdRmOnKgiYozYEkNAxth8j7O1aamfnp29yssFOYM-1JcnXVQPdLFErzCgbg", "e": "AQAB" } - Example 2
{ "kty": "RSA", "use": "sig", "alg": "RS256", "kid": "nA4lW0jTEnATZ8jJ", "n": "cmeQZPdnN9InUH73GgssLlXORbkFjHHctimjYUJXuOkrfoIYXdLvkstoWqYwLkjyPOpLIM6WEbW22-XZ2FCk7iECGw6XIbHEV54Gju2rJkQwiDCt6w3Y58iWgH1OHpKnw2Ek0hOYSn16bEsKNQMxtmQdZzgcIbMILGKTODaSkNpW-YSTk1j53UHl8XI0ZfMtFF-oH5Van8J--yo8FZ5BVt4cDmj-2AJBTvLIfZNvlIsTJHQ4Qt7nKoZsPZ5Ngh9FO-5dyuijlQbYxp-ZYYLqBry9cVqYGWf4ZKkH7pQy0oQGPvvl2vJc9cdi-NT5yYy0JlX3fBs2Xov01_JQ4Hhral", "e": "AQAB" } - Example 3
{ "kty": "RSA", "use": "sig", "alg": "RS256", "kid": "NRVl2QMwsFaWx_S9", "n": "jvjkr-meW2fKDschEXU8n8b3yFv210otbIlS7GVi3SIbhgWGq6idhwGgE900CGU81LTZVVMP8GflP1QfOcQ16rCyRpT0U0-5IdH3E2hNRVlu3GjE9DaTCHSy0p_Hf1bB8D7ygFVyR-8LeLvl51Cfnj0zPsRY2BCx81UwGyMSg68YHQIDJklsE-TwYe7EVhvr7ShIJWKD763Z3DgJI2VBTMc1AqCX8zUPMZAqZG_Ay1CmHiJ1mz7rMJBCG5pVxtmWeooWyxSZh6dfegMeXxuSgwHG2ESmGBvPJk21vgnnZA05ajfNFLUVc8i9r6-bW9z_C65aoyrziORv8IUALEiCkZ", "e": "AQAB" }
About this generator
OAuth and OpenID Connect code that fetches and parses a JWKS endpoint is tedious to test without a real key infrastructure. Standing up an auth server just to get a JWK object is overkill for a unit test. This tool emits a structurally correct RSA JWK — with all the standard fields populated — so you can test your parsing, routing, and key-rotation logic in isolation. The key use input selects between sig (signature) and enc (encryption). A sig key sets alg to RS256; an enc key sets alg to RSA-OAEP-256. The output includes kty: "RSA", a random kid, a 342-character base64url modulus (n), and the standard public exponent e: "AQAB". The modulus is random bytes, not a real key pair, so the JWK is structurally valid but cryptographically meaningless — it cannot verify a signature or decrypt a payload. Wrap it in a {"keys": [...]} object to mock a JWKS endpoint response, and swap in a real key pair when you move to integration tests.
How to use
- Choose the key use — signature or encryption.
- Click Generate to produce a fake JWK object.
- Copy the JSON into your test fixtures.
- Use it to test parsing, never real crypto.
Use Cases
- •Testing a JWKS endpoint parser
- •Mock keys for JWT verification code
- •Fixtures for OAuth and OIDC testing
- •Exercising key-rotation handling logic
- •Demoing a key-management UI
Tips
- →This is for parsing tests only — it is not a real key.
- →Match kid handling to your real JWKS logic.
- →Wrap it in a "keys" array to mock a JWKS response.
- →Never use a fake JWK for actual verification.
FAQ
is this a real cryptographic key
No — it is structurally valid JSON in the JWK format, but the modulus and key material are random, not a real key pair. It cannot sign, verify, encrypt, or decrypt anything. Use it only to test how your code parses and handles a JWK.
what fields does the generated JWK include
The output includes kty (RSA), use (sig or enc), alg (RS256 or RSA-OAEP-256 depending on the selected use), a random kid, a 342-character random base64url modulus (n), and the standard public exponent AQAB (e). Private key fields (d, p, q) are not included.
what can I test with a fake JWK
Anything that parses or routes a JWK without performing real crypto — JWKS fetching and caching, key-ID matching, key-rotation handling, and UI display. For actual signature verification you need a real key pair, not a fake one.
You might also like
Popular tools from other categories that share themes with this one.