Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsJWK to PEM ConverterPEM to JWK

PEM to JWK

dev

Turn a PEM public key, private key or certificate into a JSON Web Key or a JWK Set

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.

Publishing a jwks.json endpoint, or configuring an OAuth or OpenID Connect provider, needs keys as JSON Web Keys, while OpenSSL and most servers write PEM. Paste a PEM public key, a private key in PKCS#8, PKCS#1 or SEC1 form, or a certificate, and get the JWK with its RFC 7638 thumbprint as the kid. Tick As a JWK Set to wrap several keys in {"keys": [...]} ready to publish.

Next:
  • Base64 Encode & Decode Text and files to Base64 and back, with URL-safe mode and image preview
  • JWT Decoder, Verifier & Encoder Decode any JWT, verify its signature, and sign new tokens, all in your browser

How to convert a PEM key to a JWK

1

Paste the PEM block, or several, into the box.

2

Tick Public key only before publishing, so the private part is never in the output.

3

Tick Add kid and As a JWK Set, then copy the result into jwks.json.

How PEM to JWK works

JSON Web Keys and PEM files hold the same numbers in two wrappings. A JWK names each part, such as the modulus "n" and exponent "e" of an RSA key or the point "x" and "y" of an EC key, in Base64url. A PEM file holds the same values in DER, the binary format of X.509 and OpenSSL, inside BEGIN and END lines.

Key JWK to PEM PEM to JWK
RSA public SPKI or PKCS#1 PUBLIC KEY, RSA PUBLIC KEY, certificate
RSA private PKCS#8 or PKCS#1 PRIVATE KEY, RSA PRIVATE KEY
EC P-256, P-384, P-521, secp256k1 SPKI; PKCS#8 or SEC1 PUBLIC KEY, PRIVATE KEY, EC PRIVATE KEY
Ed25519, Ed448, X25519, X448 SPKI; PKCS#8 PUBLIC KEY, PRIVATE KEY

A JWK Set with several keys becomes several PEM blocks, and several PEM blocks become a JWK Set. Certificates and certificate requests give their public key.

The rest of the article, and all 6 questions about JWK to PEM Converter, are on the JWK to PEM Converter page.

Frequently asked questions

How do I convert a JWK to PEM?

Paste the JWK into the box and the PEM appears at once: a PUBLIC KEY block for a public key, a PRIVATE KEY block for a private one. For RSA keys you can switch to the older PKCS#1 form, and for EC private keys to SEC1. A JWK Set with several keys gives one PEM block for each key.

How do I get a PEM public key from a JWKS URL?

Open the jwks.json address of the provider in your browser, copy the whole JSON and paste it here. Each key in the keys list becomes a PEM public key, labelled with its type, size and thumbprint, so you can match it with the kid in the header of the token you want to verify.

What is a JWK thumbprint?

A short identifier computed from the key itself, defined in RFC 7638: the required members, such as e, kty and n for RSA, are written as JSON in alphabetical order without spaces and hashed with SHA-256. The same key always gets the same thumbprint, so it works well as a kid.

Why can an Ed448 private key not be converted to a JWK?

A JWK for an Ed448 or X448 private key must include the public key, and OpenSSL usually writes these PEM files without it. Working it out needs Ed448 maths that browsers do not provide. Export the key with its public part, or convert the public key separately.

Sources

  • RFC 7517, JSON Web Key (JWK)JWK and JWK Set structure; the example EC key of appendix A.1
  • RFC 7518, JSON Web Algorithms, section 6RSA and EC key parameters (n, e, d, p, q, dp, dq, qi; crv, x, y, d)
  • RFC 8037, CFRG curves in JOSEOKP keys: Ed25519, Ed448, X25519, X448
  • RFC 7638, JWK ThumbprintThe thumbprint and its example value in section 3.1
  • RFC 5208 / 5958 (PKCS#8), RFC 8017 (PKCS#1), RFC 5915 (SEC1), RFC 5280 (SPKI)The DER structures inside each kind of PEM

Last verified 16 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about JWK to PEM Converter and anybody who knows can answer. No account needed.

More ways to use JWK to PEM Converter

  • JWK to PEM ConverterConvert a JSON Web Key to PEM and back for RSA, EC and Ed25519 keys, with the thumbprint

On the related tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON · Query String Parser – Split a URL query string into a table of decoded parameters.

Related tools

All developer tools
Base64 Encode & DecodeText and files to Base64 and back, with URL-safe mode and image previewUnix Timestamp ConverterUnix timestamps to dates and dates to timestamps, in any time zoneJSON to TypeScriptGenerate TypeScript interfaces or types from a JSON sampleCSV to JSONConvert CSV to JSON and JSON to CSV, with a table previewYAML to JSONConvert YAML to JSON and JSON to YAML, with anchors resolvedURL Encoder / DecoderPercent-encode or decode text and URLs, and see every part of a linkColor ConverterHEX, RGB, HSL, HWB, OKLCH and CMYK in both directions, with a contrast checkNumber Base ConverterBinary, octal, decimal, hex and any base to 36, exact at any size, with two's complement
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)