Key Facts
- Category
- Security & Validation
- Input Types
- select, text, checkbox, textarea
- Output Type
- html
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The JWK Generator & Parser is a utility for creating and inspecting JSON Web Keys (JWK). It supports generating keys for RSA, Elliptic Curve (EC) curves like P-256, P-384, P-521, and secp256k1, as well as Octet Key Pair (OKP) curves including Ed25519, Ed448, X25519, and X448. Additionally, it allows you to parse existing JWK strings to inspect their cryptographic parameters, key thumbprints, and metadata.
When to Use
- •When you need to generate a new public/private key pair formatted as a JSON Web Key (JWK) for JWT signing or encryption.
- •When you need to extract the public key component from an existing private JWK to share with external clients.
- •When you need to parse and inspect the parameters, key ID (kid), or thumbprint of an existing JWK string.
How It Works
- •Select the mode: choose 'Generate' to create a new key, or 'Parse' to inspect an existing JWK.
- •For generation, select the key type (RSA, EC, or OKP), configure the key size or curve, optionally assign a custom Key ID (kid), and choose whether to export only the public key.
- •For parsing, paste your JWK JSON string into the input area to decode its properties.
- •View the generated or parsed JWK output, including its cryptographic parameters and metadata.
Use Cases
Examples
1. Generate an EC P-256 Key Pair for JWT Signing
Backend Developer- Background
- A developer needs to configure an OAuth2 authorization server that signs tokens using Elliptic Curve cryptography.
- Problem
- They need a valid P-256 EC key pair formatted as a JWK with a specific Key ID.
- How to Use
- Set Mode to 'Generate', Key Type to 'EC', Curve to 'P-256', and enter 'auth-key-v1' in the Key ID field. Leave 'Public Only' unchecked to get both public and private parameters.
- Example Config
-
Mode: Generate, Key Type: EC, Curve: P-256, Key ID: auth-key-v1, Public Only: false - Outcome
- A JSON object containing the private and public parameters (kty, crv, x, y, d, kid) ready for use in the server configuration.
2. Parse and Inspect an Existing RSA JWK
Security Engineer- Background
- An engineer is troubleshooting a token verification failure and needs to verify the parameters of a public key.
- Problem
- They have a raw JWK string and need to check its key type, modulus, and exponent.
- How to Use
- Set Mode to 'Parse' and paste the JWK JSON string into the 'JWK to Parse' text area.
- Example Config
-
Mode: Parse, JWK to Parse: {"kty":"RSA","n":"u1W2...","e":"AQAB","kid":"key-2"} - Outcome
- The tool parses the key, displaying its RSA parameters, key size, and confirming the key structure is valid.
Try with Samples
json, imageRelated Hubs
FAQ
What key types can I generate?
You can generate RSA, EC (P-256, P-384, P-521, secp256k1), and OKP (Ed25519, Ed448, X25519, X448) keys.
Can I generate a public-only JWK?
Yes, check the 'Public Only' option to exclude private key parameters from the generated output.
What is the 'kid' parameter?
The 'kid' (Key ID) is an optional identifier used to match a specific key in a set of JSON Web Keys.
How do I inspect an existing JWK?
Switch the mode to 'Parse', paste your JWK JSON string into the input field, and view the decoded parameters.
Are my private keys secure when using this tool?
Yes, all key generation and parsing operations run locally in your browser without transmitting key data to any server.