Paste one public JWK and get it back as a PEM block. A JWK with a secret in it is stopped before anything is written.
FluffyShieldProtected workspace
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Is the JWK you were sent safe to paste?
Look for a line that starts with "d". A public key never has one.
FluffyBench · 4 min read · Reviewed
What the converter does
Look for any secret part in the JWK
→Let the browser load the key
→Write it out between BEGIN and END lines
What it does
Secrets stop it
A secret line hidden inside another part of the key still stops it.
Five kinds of key
RSA, EC keys on P-256, P-384 or P-521, and Ed25519.
Spacing doesn't matter
A JWK spread over many lines, or squeezed onto one, gives the same PEM.
Limits One key per paste, up to 16 MiB.
A key you were handed in curly brackets
A colleague has sent you a .jwk file, or a block of text that starts with a curly bracket, and a server you look after wants the key as PEM. Before it goes anywhere, it's worth knowing which half of a key pair you're holding.
Keys come in pairs. The private key is like a rubber stamp: whoever has it can sign. The public key is a print of that stamp. Anyone can hold a signature up against the print to check it, and nobody can sign anything with a print. So a public key is fine to paste into a web page, and a private key never is.
In PEM the difference is written on the first line, which says PUBLIC KEY or PRIVATE KEY. A JWK has no such line, and both halves look alike: curly brackets, short names, long runs of letters.
Telling a private JWK from a public one
Here's the sample key as the public JWK this page converts, beside the same key with its private part added.
Public and private
The long values are cut short, and the private value is hidden. In a real private P-256 key it's a run of letters as long as x. How we checked
For an elliptic-curve key like this one, or an Ed25519 key, the private part is a single member, d. An RSA private key carries d too, with five more beside it: p, q, dp, dq and qi. A k is a different thing again, a secret shared by both sides that has no public half at all.
The converter looks for every one of these before it does anything else. Finding one gets this message: "Private or symmetric key material is not accepted. Remove it and provide a public JWK only." Nothing is converted.
If you see it, you've been handed the wrong half, or the whole pair. Go back to whoever sent the file and ask for the public key on its own.
What comes out the other side
The PEM block is the same key in the older form that tools like OpenSSL read: a BEGIN PUBLIC KEY line, the key spelled out in letters, and an END line.
Before writing a line, the converter checks that each value is the right length for the key's curve, and then has your browser load the key with its own cryptography. A damaged JWK fails there. We tried the sample key with one byte missing from x and got "The x value has the wrong byte length for this curve." Better to hear it now than from the server later.
What doesn't survive is the name tag. A JWK can say kid, alg, use and key_ops; a PEM block has nowhere to put them. Our sample key with "kid": "sample-p256" gave exactly the same PEM as the key without it. If anything downstream still looks keys up by their kid, keep the JWK file as well.
One key in, one PEM block out
The box at the top of this page, FluffyBench's Certificate and public key inspector set to JWK to PEM, takes a single key at a time: from one opening curly bracket to its closing one.
Paste one key into the Public key box, from its opening { to its closing }.
The PEM block shows under Result straight away, between its BEGIN and END lines.
Press Download to save it as public-key.pem.
If what you have isn't one public key
Your file opens with "keys" and holds several keys
It lists every key in the set with its kid, so you can tell which one to copy out. Pasted here, a whole set gets "PEM conversion accepts one public JWK. Select a key from the JWKS first."