JWK ⇄ PEM Key Converter
NewConvert between PEM-format public/private keys and JSON Web Key (JWK) format using the Web Crypto API, entirely client-side.
Paste a key and click Convert.
Frequently Asked Questions
What is a JWK, and why would I need to convert to/from PEM?
A JSON Web Key (JWK) is a JSON representation of a cryptographic key defined by RFC 7517, commonly required by JOSE/JWT libraries (like the "jose" npm package) and identity providers that expose keys via a JWKS endpoint. PEM is the more traditional base64/ASN.1 format used by OpenSSL and most TLS tooling — this tool bridges the two so you can use the same key with either ecosystem.
Does this generate new keys, or only convert existing ones?
It only converts — paste an existing PEM or JWK key and it re-encodes the same key material into the other format. If you need to generate a brand-new key pair first, use this site's separate RSA Key Pair Generator tool, then convert the resulting PEM here if you need a JWK.
Why do I need to select "Public key" vs "Private key" before converting?
PEM keys use different container formats for public keys (SPKI) versus private keys (PKCS#8), and the Web Crypto API requires you to specify which one you're importing/exporting — selecting the wrong type will cause the conversion to fail with an import error.
Does my private key ever leave my browser?
No — every operation uses the browser's built-in Web Crypto API (crypto.subtle) and runs entirely client-side. Nothing is uploaded or sent to any server, which matters since private keys are sensitive.
What key algorithms are supported?
RSA (RSASSA-PKCS1-v1_5 with SHA-256, matching RS256 in JWT terms) and EC (ECDSA on the P-256 curve, matching ES256). Other algorithms or curves are not currently supported by this tool.