Tool

RSA Key Converter

Convert an RSA private key between PKCS#1 ("RSA PRIVATE KEY") and PKCS#8 ("PRIVATE KEY") — the format mismatch that trips up Java, Node, and some mail servers.

Everything on this page runs in your browser. Nothing you paste or upload is sent anywhere.

Converted key

Download

How to tell which format you have

PKCS#1Header reads -----BEGIN RSA PRIVATE KEY-----. This is the older, RSA-specific format — what OpenSSL produces by default with openssl genrsa.
PKCS#8Header reads -----BEGIN PRIVATE KEY----- (no "RSA"). This is the newer, algorithm-agnostic format Java, Node.js, and some mail servers specifically expect.