Guide
Converting JSON Web Keys to PEM and back, with thumbprints
Identity providers and APIs publish their signing keys as JSON: a JWKS document at a well-known address, with each key as a JSON Web Key. Servers, OpenSSL and many libraries want the same key as a PEM file. This page converts between the two for the common key types and also gives you the key’s thumbprint, which is the safest way to say two keys are identical.
From JWK to PEM
A JWK is a small object. For an RSA public key it holds kty set to RSA plus n, the modulus, and e, the exponent, both Base64URL. An EC key holds crv (the curve) plus the coordinates x and y. An OKP key such as Ed25519 holds crv and x. The page validates those members and asks your browser’s Web Crypto API to export the key in the standard container: SubjectPublicKeyInfo for public keys, PKCS#8 for private keys. The result is wrapped in a BEGIN and END armour with Base64 in between, 64 characters per line.
A worked example
Press Sample on the JWK tab to load an EC P-256 key. The page reports an EC key and gives the public key as SubjectPublicKeyInfo, starting MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE. That prefix is the fixed header of every P-256 public key: it spells out the algorithm id-ecPublicKey and the curve prime256v1, followed by the 65-byte uncompressed point. The page also prints an OpenSSH line, ecdsa-sha2-nistp256 AAAAE2VjZHNh…, and the RFC 7638 thumbprint yQepVpn8eSVP39UaRjsAtFGpBkxa_Qw_r5RzXyywcY0.
From PEM to JWK
Switch to “PEM or certificate to JWK” and paste a public key, a private key or a certificate. For a certificate the page extracts the public key and does not touch the rest. Private keys in PKCS#8 and RSA PKCS#1 form are accepted. A key protected by a passphrase (the kind labelled ENCRYPTED PRIVATE KEY) is not supported; decrypt it first, for example with openssl pkey, on your own machine.
Thumbprints
RFC 7638 defines a canonical form: take only the members that identify the key (e, kty, n for RSA; crv, kty, x, y for EC; crv, kty, x for OKP), sort them by name, write JSON with no spaces, hash with SHA-256 and encode in Base64URL. Anyone following the rule reaches the same string, which is why it works as a key identifier and as a matching kid.
Edge cases
JWKS documents may hold several keys; the page converts each one and lists them separately as Key 1, Key 2 and so on, with the kid in the heading when the key has one. Keys on curves your browser does not support, such as secp256k1, are rejected with a message. Ed25519 and X25519 need a recent browser.
Limits
The page does not fetch a JWKS from a URL: paste the document. It does not verify that a key belongs to the issuer. Private keys are handled locally in memory and not stored, but treat any key you paste anywhere as exposed if it protects something real.
Related tools
- JWT Decoder reads the token whose signature these keys check.
- RSA and Ed25519 Key Pair Generator makes keys in PEM and OpenSSH form.
- ASN.1 Decoder shows the structure inside a PEM file.
- SSH Key Fingerprint Calculator fingerprints the OpenSSH line.
Checked against the current version of the JWK to PEM Converter on .

