RSA Key Conversion
{{ keySummary || '—' }}
{{ detectedLabel }}
{{ keyBits }}-bit {{ keyKind }} {{ outputLabel }} Encrypted input
Input:
Field Value Copy
{{ row[0] }} {{ row[1] }}
Nothing to show yet.

                
:

Introduction:

RSA keys are commonly stored in PEM with different wrappers that look similar but are not interchangeable. A key that imports cleanly in one server or library can fail in another when the container format does not match what that system expects.

This tool reads an RSA private or public key and rewrites it as another standard wrapper. It helps when you need to move between PKCS#1 and PKCS#8, or when you need a public key in either SPKI or RSA PUBLIC KEY form.

If your input is encrypted, provide the passphrase to decode it. If you choose an encrypted PKCS#8 output, the passphrase is used to protect the exported key.

Technical Details:

RSA keys are defined by a modulus n and a public exponent e. Private keys include additional values that allow signing and decryption. The same RSA key material can be wrapped in different ASN.1 structures depending on the standard.

  • PKCS#1 private uses the RSA PRIVATE KEY structure.
  • PKCS#8 private uses PRIVATE KEY (and ENCRYPTED PRIVATE KEY when protected with a passphrase).
  • SPKI public uses PUBLIC KEY (SubjectPublicKeyInfo).
  • PKCS#1 public uses RSA PUBLIC KEY.

The output is re-encoded with configurable PEM line wrapping so you can match formatting conventions.

FAQ:

Does converting change the key?

No. The math stays the same. Only the container and encoding change.

Why does a system reject my key after conversion?

Double-check whether it expects PKCS#1 or PKCS#8, whether it accepts encrypted keys, and whether you exported a private key or public key by mistake.