JWK to PEM Converter
Convert RSA, EC and Ed25519 keys from JWK or a JWKS to PEM, or from PEM and certificates to JWK with a thumbprint kid, using your browser's Web Crypto.
How to convert between JWK and PEM
Paste your JWK, JWKS or PEM key
Paste or type your JWK, JWKS or PEM key into the box, or press Try an example.
Set the JWK options
When making a JWK, add a kid, use and alg if your system needs them.
Copy or download the result
Copy the result with one click. Many tools also offer a download.
Worked example
This is what JWK to PEM Converter gives for its own sample values. Open the tool above and change anything to try your own.
JWK, JWKS or PEM key
{
"kty": "EC",
"crv": "P-256",
"kid": "signing-key-2026",
"use": "sig",
"x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
"y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"
}- Add a kid (RFC 7638 thumbprint) when making a JWK
- Yes
- use
- sig (signing)
- alg (optional)
- Wrap JWKs in a JWKS ({ "keys": [...] })
- No
Key "signing-key-2026": public key (SPKI), EC P-256
-----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf83OJ3D2xF1Bg8vub9tLe1gHMzV7 6e8Tus9uPHvRVEXH8UTNG72bfocs3+257rn0s2ldbqkLJK2KRiMohYjlrQ== -----END PUBLIC KEY-----
When to use JWK to PEM Converter
A library wants a PEM public key but the identity provider publishes its keys as a JWKS endpoint.
You are setting up a JWKS endpoint for your own service and need your PEM keys as JWKs with stable key ids.
Tips for a better JWK to PEM Converter result
Paste a whole JWKS to convert every key at once; each result is labelled with its kid so you can match keys to tokens.
Turn on the thumbprint kid when publishing keys, since it stays the same for a key and changes when the key is rotated.
JWK to PEM Converter: limits and what to check
Symmetric keys (kty oct) have no PEM form, so HMAC secrets cannot be converted and are reported as unsupported.
EC keys on curves other than P-256, P-384 and P-521, such as secp256k1, are not supported by browser Web Crypto.
About JWK to PEM Converter
Keys move between JWK (the JSON form used by OAuth, OpenID Connect and JWKS endpoints) and PEM (the text form used by OpenSSL, servers and most libraries). RSA, EC P-256, P-384 and P-521 and Ed25519 keys are supported, public or private, and a certificate gives its public key as a JWK.
FAQs
What is the kid?
A key id that lets a server pick the right key from a JWKS. The RFC 7638 thumbprint is a stable choice because it is computed from the key itself.
Which PEM types can I paste?
PUBLIC KEY, PRIVATE KEY, RSA PUBLIC KEY, RSA PRIVATE KEY, EC PRIVATE KEY and CERTIFICATE blocks.
Is it safe to paste a private key?
The conversion runs in your browser with Web Crypto and nothing is uploaded. Treat the result with the same care as the original.