RSA PEM to JWK
Import RSA PKCS8 private or SPKI public PEM and export a JWK.
Your workspace
Processed in your browserThis utility converts RSA keys from standard PEM (Privacy-Enhanced Mail) format into the JSON Web Key (JWK) format. This is useful for integrating RSA keys into web applications, APIs, or libraries that require the JWK structure (RFC 7517).
How to convert your RSA key
- Paste your RSA PEM block into the input area. The tool accepts standard SPKI public keys or PKCS8 private keys.
- The tool automatically detects the key type and outputs the corresponding JWK JSON object, which you can copy for use in your application.
Supported formats and limitations
This tool strictly supports RSA keys in SPKI (Subject Public Key Info) or PKCS8 (Private-Key Information Syntax) formats. It does not support legacy PKCS1 formats, OpenSSH keys, or encrypted PEM files. Because this operation runs entirely within your browser using the Web Crypto API, your private keys are never transmitted to a server.
Example input and output
-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG...\n-----END PUBLIC KEY-----
{"kty":"RSA","n":"...","e":"AQAB"}
Questions about RSA to JWK conversion
Why does my key fail to convert?
Ensure your PEM block is properly formatted with the correct headers (e.g., '-----BEGIN PUBLIC KEY-----'). This tool does not support PKCS1 keys (which start with '-----BEGIN RSA PUBLIC KEY-----') or encrypted keys.
Is the output JWK safe to use?
Yes, the output is a standard JSON representation of your key. If you are converting a private key, ensure you handle the resulting JWK with the same security precautions as the original PEM file.
Continue your workflow
Explore more tools in this category for your next step.
JWK Inspector
Inspect JSON Web Key type, public fields and RFC 7638 thumbprint without sending the key to a server.
Base64 to PEM
Wrap Base64 DER text in selected PEM armor with 64-character lines.
PEM Inspector
Inspect a PEM label, decoded byte length, DER root tag and SHA-256 fingerprint locally; encoded private material is not printed in the report.
PEM to Base64
Remove PEM armor and whitespace to extract its Base64-encoded DER bytes.