JWK ↔ PEM Converter.
Convert RSA, EC and Ed25519 keys between JWK (JSON Web Key) and PEM, with RFC 7638 thumbprints.
Runs in your browserAbout JWK ↔ PEM Converter
JWK ↔ PEM converts keys between the JSON Web Key format used by OAuth, OpenID Connect and JWKS endpoints and the PEM files that OpenSSL, nginx, Java and most server libraries expect. Paste a JWK (or a whole JWKS with a keys array) and you get PEM blocks; paste a PEM public key, private key or X.509 certificate and you get the JWK. RSA keys, elliptic-curve keys on P-256, P-384, P-521 and secp256k1, and Ed25519, Ed448, X25519 and X448 keys are supported. Public keys become SubjectPublicKeyInfo ("BEGIN PUBLIC KEY"); private keys become PKCS#8, or with the traditional option PKCS#1 ("BEGIN RSA PRIVATE KEY") and SEC1 ("BEGIN EC PRIVATE KEY"). For a certificate, the subject's public key is extracted, which is the usual way to build a JWKS entry from a cert. The details panel shows the key type, size or curve and the RFC 7638 thumbprint, a stable hash many systems use as the kid. A typical use is verifying JWTs: an identity provider publishes its keys as JWKS, but your library wants PEM. Common mistakes include pasting a JWK with kty "oct" (a symmetric secret, which has no PEM form), dropping the CRT values p, q, dp, dq and qi from an RSA private JWK, and pasting an encrypted private key; decrypt it first with openssl pkey. Deriving a missing public key needs elliptic-curve arithmetic that this tool does not do, so EC and Ed25519 private keys without an embedded public part are reported rather than guessed. Conversion happens in your browser; keys are never uploaded or kept in the page URL.
How to Use
- Paste a JWK, JWKS or PEM block (public key, private key or certificate).
- For JWK → PEM, choose PKCS#8/SPKI or the traditional PKCS#1/SEC1 format.
- Copy the result and check the key type and thumbprint in the details.
Frequently Asked Questions
Which key types are supported?
RSA, EC (P-256, P-384, P-521, secp256k1) and OKP (Ed25519, Ed448, X25519, X448). PEM input can be PUBLIC KEY, PRIVATE KEY, RSA PUBLIC KEY, RSA PRIVATE KEY, EC PRIVATE KEY or CERTIFICATE.
What is the thumbprint?
The RFC 7638 JWK thumbprint, a base64url SHA-256 hash of the key's required members. It does not change between formats, so it is often used as the key ID (kid).
Why is my Ed25519 private key rejected?
OpenSSL writes Ed25519 private keys without the public key, but a JWK needs it in "x". Computing it requires curve arithmetic this offline tool does not implement. Convert the matching public key separately or export a PKCS#8 v2 key.
Are encrypted keys supported?
No. Decrypt the key first, for example with openssl pkey -in key.pem -out plain.pem.
Is my private key sent anywhere?
No. The conversion runs in your browser and the page is marked sensitive, so inputs are not stored in the URL or history.
Related Tools
Decode, inspect, and verify JSON Web Tokens.
Build and sign HS256, HS384 and HS512 JSON Web Tokens from a header, payload and secret.
Decode PEM or DER certificates to see subject, issuer, validity, SANs, key and extensions.
Decode a PKCS#10 certificate signing request and check its subject, SANs and key before you order.
Encode and decode Base64 strings.
Generate MD5, SHA-256, SHA-512, and other hashes.