JWK ↔ PEM Converter

JWK to PEM & PEM to JWK Key Converter

Convert JSON Web Keys (JWKS / JWK) to standard PKCS#8 & PKCS#1 PEM public and private keys for JWT verification. 100% computed locally in your browser using the Web Cryptography API.

JWK / JWKS Input
456 characters
PEM Formatted OutputSPKI Public
Format:
JWT Verification & JWKS Route Integration Code
// Verify JWT using Node.js jsonwebtoken
const jwt = require('jsonwebtoken');

const publicKey = `-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----`;

function verifyToken(token) {
  try {
    const decoded = jwt.verify(token, publicKey, {
      algorithms: ['RS256'],
    });
    console.log('Token successfully verified:', decoded);
    return decoded;
  } catch (err) {
    console.error('JWT Verification failed:', err.message);
    throw err;
  }
}
JWK vs PEM Formats

JSON Web Key (JWK) (RFC 7517) represents cryptographic keys as JSON objects with Base64URL-encoded parameters (such as n and e).PEM encapsulates ASN.1 DER binary keys within Base64 lines bordered by BEGIN/END markers.

PKCS#8 vs PKCS#1

PKCS#8 (BEGIN PUBLIC KEY / BEGIN PRIVATE KEY) is the modern universal standard containing algorithm identifiers.PKCS#1 (BEGIN RSA PRIVATE KEY) is legacy RSA-specific. This converter bridges both formats automatically.

Zero-Server Security

Private keys never leave your machine. All cryptographic operations—including ASN.1 wrapping, RSA prime parsing, and RFC 7638 SHA-256 fingerprinting—are executed strictly in memory inside the client browser.