Skip to content

PEM to JWK Converter

Extract JWK metadata from PEM-formatted public/private key files.

Input

text
loading editor…

Paste your PEM key here...
or drop a file anywhere in this pane

Output

json

Converted JWK will appear here...
press to convert to jwk

What Is PEM Format?

PEM (Privacy-Enhanced Mail) is a base64-encoded format for cryptographic keys and certificates, distinguished by -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- header lines. It is the standard format used by OpenSSL, web servers, and TLS/SSL configurations worldwide.

This tool is used for:

  • Cloud Key Management: Convert PEM public keys from cloud providers (AWS KMS, Google Cloud KMS) into JWK format for use in web-based authentication systems.
  • Web Cryptography API: Transform PEM keys into JWK, which is the native key format for the Web Crypto API in browsers and Node.js.
  • JWKS Endpoint Generation: Create JWK representations of PEM keys to publish in a JWKS (JSON Web Key Set) endpoint for OAuth and OIDC providers.

How to Use PEM to JWK Online

  1. Paste your PEM key: Enter the PEM-formatted key including the BEGIN and END header lines into the input editor.
  2. Click Convert to JWK: The tool parses the PEM structure, extracts the key parameters, and generates a JSON Web Key object with all required fields.
  3. Use in web applications: Copy the resulting JWK JSON for use with the Web Crypto API, JWT libraries, or for inclusion in a JWKS endpoint.

Frequently Asked Questions

Why would I need to convert PEM to JWK?

Modern web applications and APIs increasingly use JWK format because it integrates natively with JavaScript Web Crypto API, JWT libraries (jsonwebtoken, jose), and OAuth/OIDC standards. Converting PEM to JWK bridges the gap between traditional PKI infrastructure and modern web authentication.

Is this tool safe?

Yes. All processing happens 100% client-side in your browser. Nothing is uploaded to any server.

Is this tool free?

Yes, completely free with no usage limits or registration required.

Real-World Examples

Developers building OAuth 2.0 authorization servers or OpenID Connect providers need to expose JWKS endpoints containing their signing keys in JWK format. If the signing keys are stored as PEM files — which is common when using OpenSSL for key generation — this tool converts them to the JWK format required by the JWKS specification (RFC 7517).

Related Tools