RSA JWK to PEM
Import an RSA-OAEP JWK and export a PKCS8 or SPKI PEM key.
Your workspace
Processed in your browserThis utility converts an RSA-OAEP JSON Web Key (JWK) into a standard PEM-encoded format. It automatically detects whether the input is a public key (exporting to SPKI) or a private key (exporting to PKCS8) based on the presence of the 'd' parameter.
How to convert your JWK
- Paste your RSA JWK object into the input field. Ensure the JSON is valid and contains the necessary RSA components.
- The tool processes the key locally using the Web Crypto API and outputs the corresponding PEM block, which you can copy for use in your applications.
Supported formats and limitations
This tool is strictly limited to RSA-OAEP keys using the SHA-256 hash algorithm. If your JWK uses a different algorithm or curve, the conversion will fail. Note that the exported private key PEM is unencrypted; ensure you handle the output securely and do not store it in insecure locations.
Example conversion
{"kty":"RSA","n":"...","e":"AQAB"}
-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----
Frequently asked questions
Why does my conversion fail?
Conversion fails if the input is not a valid RSA JWK, uses an unsupported algorithm (anything other than RSA-OAEP with SHA-256), or is missing required RSA components.
How do I know if my output is public or private?
The tool automatically determines the key type. If the input JWK contains the private exponent 'd', it outputs a PKCS8 'PRIVATE KEY' block. Otherwise, it outputs an SPKI 'PUBLIC KEY' block.
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.