Your files never leave your device. We don't upload, transfer, or store your data.
{{ previewContent }}
In modern web security, developers frequently work with varying cryptographic key formats.
PEM (Privacy-Enhanced Mail): This is the traditional Base64-encoded format enclosed by headers (e.g., -----BEGIN PRIVATE KEY-----). It is widely used by OpenSSL, web servers (TLS/SSL certificates), and legacy systems.
JWK (JSON Web Key): This is a modern, structured JSON format standardized in RFC 7517. It is the de facto standard for cloud-native applications, OAuth 2.0, OpenID Connect, and JSON Web Tokens (JWT).
When configuring identity providers like Auth0, AWS Cognito, or building custom JWT authentication in Node.js, Go, or Python, you often need to translate a traditional PEM key into a JWK, or vice versa. Our bidirectional converter seamlessly bridges this gap, supporting the modern PKCS#8 standard for PEM generation to ensure maximum compatibility across modern cryptography libraries.
As security engineers, we know the cardinal rule of cryptography: Never paste your private keys into random online tools.
That is exactly why we built this tool differently. This converter leverages the native WebCrypto API and secure client-side JavaScript.
Zero Server Interaction: The conversion algorithms run entirely locally within your browser's sandboxed memory.
No Payloads Sent: We do not log, track, or transmit your public or private keys over the network. Your keys literally never leave your machine.
Our tool provides a frictionless, two-way conversion experience for RSA, EC (Elliptic Curve), and other supported algorithms:
To Convert PEM to JWK:
Paste your Base64-encoded PEM string (including the -----BEGIN... and -----END... tags) into the designated PEM input field.
The engine will instantly parse the ASN.1 structure and generate a strictly formatted JSON Web Key (JWK) in the output field.
Click "Copy" to use the JWK in your application's JWKS endpoint or JWT configuration.
To Convert JWK to PEM (PKCS#8):
Paste your valid JSON Web Key payload into the JWK input field.
The tool will automatically extract the cryptographic parameters (such as modulus and exponent for RSA, or curve parameters for ECDSA) and encode them into a standard PKCS#8 PEM format.
Click "Copy" to save the PEM string for your server configuration or OpenSSL usage.
Q: Is it genuinely safe to paste my production private key here?
A: Yes, it is technically safe because this page acts merely as a localized script runner. Your browser executes the conversion locally without making any network requests. However, as a security best practice, we always recommend converting highly sensitive production private keys via offline command-line tools (like OpenSSL or specialized local scripts). This online tool is perfect for development, testing, and handling public keys.
Q: Why does the tool convert JWK to PEM in PKCS#8 format specifically?
A: PKCS#8 is the modern, standardized syntax for storing private key information (RFC 5208). Unlike the older PKCS#1 format (which is specific to RSA), PKCS#8 is algorithm-agnostic, meaning it uniformly supports RSA, ECDSA, and Ed25519. Most modern programming languages and frameworks (like Java, Node.js, and Golang) prefer or explicitly require PKCS#8 formatted keys.
Q: Which cryptographic algorithms are supported?
A: Our client-side engine supports the most common algorithms used in modern web authentication, including RSA (RS256, RS384, RS512) and various Elliptic Curves (such as P-256, P-384, P-521 used in ES256/ES384/ES512).
Q: What if I get an "Invalid Format" error?
A: This usually means the pasted string is missing required headers, has invalid Base64 padding (for PEM), or contains malformed JSON properties (for JWK). Ensure you are pasting the entire key block, including the -----BEGIN and -----END lines for PEM formats.