PEM JWK Converter

Convert PEM keys to JWK and JWK back to PEM. Supports RSA and EC keys (SPKI, PKCS#8, PKCS#1, SEC1). Runs entirely in your browser.

All conversions run locally in your browser. Keys never leave your device.

What is a PEM JWK converter?

PEM is the classic Base64 key format with BEGIN/END headers used by OpenSSL and most certificate tooling, while JWK (JSON Web Key, RFC 7517) is the JSON representation used by JOSE, JWT and OAuth stacks. A converter lets the same key work in both worlds.

This tool imports SPKI and PKCS#8 keys — and re-wraps the legacy PKCS#1 and SEC1 formats automatically — then exports the matching JWK, or converts a JWK back into a standard PEM. Everything runs locally in your browser.

How to convert PEM to JWK

Paste your PEM key on the PEM → JWK tab and click Convert. The JWK is printed as pretty JSON on the right, ready to copy.

Public keys export as public JWK members (n/e for RSA, x/y for EC); private keys additionally include d and the other private members.

How to convert JWK to PEM

Switch to the JWK → PEM tab and paste the JWK JSON. The tool reads kty to detect RSA or EC and checks for the d member to tell private keys apart.

The result is a standard PEM: PUBLIC KEY (SPKI) for public keys and PRIVATE KEY (PKCS#8) for private keys.

Key information panel

After every conversion the panel shows the key type, algorithm, size in bits, and whether the key is public or private — useful for a quick sanity check.

Supported formats

PEM labels PUBLIC KEY, RSA PUBLIC KEY, PRIVATE KEY and EC PRIVATE KEY are accepted; RSA and EC keys on P-256, P-384 and P-521 are supported. Ed25519 and other types are not.

Frequently Asked Questions

What is JWK?+
JWK (JSON Web Key, RFC 7517) is a standard JSON structure that represents cryptographic keys. It is the native key format of the JOSE, JWT and OAuth ecosystems.
Which PEM types are supported?+
PUBLIC KEY (SPKI), RSA PUBLIC KEY (PKCS#1), PRIVATE KEY (PKCS#8) and EC PRIVATE KEY (SEC1). The older PKCS#1 and SEC1 containers are re-wrapped automatically.
Which key types are supported?+
RSA and elliptic-curve keys on P-256, P-384 and P-521. Other types, such as Ed25519, are not supported by this conversion path.
Where does the conversion happen?+
Entirely in your browser via the Web Crypto API. Keys never leave your device and are never uploaded anywhere.
Why does the conversion fail?+
The most common causes are an unsupported curve or key type, or a JWK missing required members such as kty, n/e or the curve parameter.

Related Tools

PEM JWK Converter — free online pem to jwk, jwk to pem, pem jwk converter, rsa public key to jwk, ec key to jwk, convert jwk private key, spki to jwk, pkcs8 to jwk, online pem jwk tool, jwt key format converter. No signup required. Works in your browser.