Convert RSA and EC keys between JWK and PEM (SPKI / PKCS#8) using the Web Crypto API. Runs entirely in your browser.
JWK (JSON Web Key) and PEM are two ways to represent the same cryptographic key. JWK is the JSON form used by JWT, OAuth and OpenID Connect, while PEM is the base64 block format used by OpenSSL, TLS servers and most command-line tooling. This tool converts a key from one representation to the other, which is handy when a library or service expects a different format than the one you have.
Input:
{ "kty": "EC", "crv": "P-256", "x": "...", "y": "..." }Output:
-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----
Which key types are supported?
RSA and EC with the P-256, P-384 and P-521 curves. The type and curve are detected automatically.
Public or private keys?
Both. Public keys use SPKI PEM, private keys use PKCS#8 PEM. A JWK with a private component d is treated as private.
Will it convert OKP / Ed25519 keys?
Not currently. Browser Web Crypto support for OKP keys is inconsistent, so this tool focuses on RSA and EC.
Is my key uploaded?
No. Conversion runs locally in your browser. Still, avoid pasting production private keys into any website.
Convert RSA and EC keys between JWK and PEM (SPKI / PKCS#8). Everything runs in your browser using the Web Crypto API.
RSA and EC (P-256, P-384, P-521). Public keys convert to SPKI PEM, private keys (with a private component) to PKCS#8 PEM. The key type and curve are detected automatically.