1. Home
  2. Developer tools
  3. JWK to PEM Converter

JWK to PEM Converter

Identity providers publish keys as JWK; servers want PEM. Convert in either direction for RSA, EC and Ed25519 keys.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use JWK to PEM Converter

  1. Choose the direction.
  2. Paste the JWK or JWKS, or the PEM key or certificate.
  3. Copy the converted key.

Features

  • RSA, EC (P-256, P-384, P-521) and OKP (Ed25519, X25519)
  • JWKS documents with several keys
  • PKCS#8 and PKCS#1 private keys, SubjectPublicKeyInfo public keys
  • Reads certificates
  • RFC 7638 JWK thumbprint
  • OpenSSH public key output

Supported formats

Input

  • JWK or JWKS JSON
  • PEM text
  • DER files (.crt, .cer, .der)

You get

  • PEM keys
  • JWK JSON
  • Thumbprint

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the JWK to PEM Converter is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Encrypted PEM private keys are not supported; decrypt them first.
  • Only RSA, EC (P-256, P-384, P-521) and Ed25519/X25519 keys are converted.

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.

Checked against the current version of the JWK to PEM Converter on .

Frequently asked questions

What is the difference between BEGIN PUBLIC KEY and BEGIN RSA PUBLIC KEY?

BEGIN PUBLIC KEY is SubjectPublicKeyInfo, which names the algorithm and works for every key type. BEGIN RSA PUBLIC KEY is the older PKCS#1 form that holds only the RSA numbers. Most software accepts the first.

Why does the kid in my JWKS differ from the thumbprint?

The kid is only an identifier chosen by the issuer, and some use a counter or a date. The thumbprint is computed from the key itself, so two systems agree on it. Compare thumbprints when you want to be sure two keys are the same.

What is a JWK thumbprint?

A SHA-256 hash of the key’s essential members in canonical JSON, Base64URL encoded. It identifies a key independently of its ID, and is often used as the kid.

Why can’t it convert my encrypted PEM key?

The key is protected by a passphrase and must be decrypted first, for example with openssl pkey. Doing so on your own computer keeps the passphrase off the web.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.