RSA Key Format Converter

RSA Asymmetric Cryptography Browser-side Processing
Drop a key file here, or click to select a file
Supports .pem / .key / .pub / .der / .txt, maximum 1 MB
File Name- File Size-
Key Type- RSA Key Size- Input Format- Encoding- Modulus Length- Public Exponent- kty-
Base64 / Hex output contains the raw encoding without PEM headers or footers and can be pasted directly into configuration files.
-
Select the target formats to generate. Each result can be copied or downloaded separately.
PuTTY PPK and MSBLOB will be supported in a future version. The current version only detects and identifies these formats.
Input Format Convert To
PKCS#1 Private KeyPKCS#8 · PKCS#1 · JWK · XML · PEM · DER · Base64 · Hex
PKCS#8 Private KeyPKCS#1 · PKCS#8 · JWK · XML · PEM · DER · Base64 · Hex
PKCS#1 Public KeySPKI · OpenSSH · JWK · XML · PEM · DER · Base64 · Hex
SPKI Public KeyPKCS#1 · OpenSSH · JWK · XML · PEM · DER · Base64 · Hex
OpenSSHSPKI · PKCS#1 · JWK · XML · PEM · DER · Base64 · Hex
JWKPKCS#1 · PKCS#8 · SPKI · OpenSSH · XML · PEM · DER
XMLPKCS#1 · PKCS#8 · SPKI · OpenSSH · JWK · PEM · DER
Raw Base64 / Hex与对应的 PKCS#1 / PKCS#8 / SPKI 一致
Privacy Notice:All key processing is performed locally in your browser. Keys are never uploaded to the server.

Automatically detect and convert public/private keys between PEM, DER, PKCS#1, PKCS#8, SPKI, OpenSSH, JWK, and XML

RSA Key Format Converter

The same RSA key often needs different representations in different environments: Java commonly uses PKCS#8, older OpenSSL toolchains output PKCS#1, SSH requires an OpenSSH public key, frontend applications and cloud services often prefer JWK, while older .NET applications used XML. This tool handles existing keys: it automatically detects what the key is and converts it to the structure and encoding you need.

Input and Automatic Detection

  • Two input methods are available: paste text directly or drop pem, key, pub, der, or txt files. The page displays the filename and file size.
  • The input format is detected automatically by default, or you can manually select PEM, DER, PKCS#1, PKCS#8, SPKI, OpenSSH, JWK, XML, raw Base64, or raw Hex.
  • You do not need to specify whether the input is a public or private key in advance. The tool determines this automatically and filters the available target formats accordingly.

Key Information

After successful parsing, the tool displays the key type (RSA public key or RSA private key), RSA bit length, input encoding, modulus length, and public exponent. This makes it easy to confirm whether the key matches expectations and determine whether a key received from another party is the same key.

Output Formats and Batch Conversion

Output is divided into two dimensions: structure and encoding. Structures include PKCS#1, PKCS#8, SPKI, OpenSSH, JWK, and XML. Encodings include PEM, DER, Base64, and Hex. These can be combined into target formats, and the page automatically filters combinations that are not applicable to public or private keys. Base64 and Hex output the raw encoding without PEM headers or footers, making it convenient to paste into configuration files. DER contains binary data and should be saved as a file through download. Batch conversion allows you to select multiple target formats at once. Each result can be copied or downloaded separately, and a conversion matrix shows the supported conversion directions.

Extract a Public Key from a Private Key

If you only have a private key, you can extract the corresponding public key with one click and output it directly as a PEM, SPKI, or OpenSSH public key. This is useful for server configuration, uploading a key to a code hosting platform, or providing a public key to an integration partner.

Error Handling and Capability Boundaries

  • When an encrypted private key is detected, the tool clearly explains that it does not perform online password decryption. Use openssl or PuTTYgen to decrypt and export the key first.
  • When EC, DSA, Ed25519, or other non-RSA keys are detected, the tool explains that only RSA keys are supported.
  • When an X.509 certificate is detected, the tool recommends using a certificate parser instead.
  • When a PuTTY PPK file is detected, the tool explains that this format is not yet supported. PuTTY PPK and MSBLOB currently receive detection notices only.
  • Unrecognized content, oversized files, and read failures all produce specific error messages explaining the reason.

Use Cases

  • Convert a PKCS#1 private key provided by an integration partner to PKCS#8 for Java.
  • Convert a PEM public key to OpenSSH format for use in a server authorization file.
  • Convert a key to JWK for frontend applications or JWT signature verification.
  • Convert a key to raw Base64 for environment variables or JSON configuration.

Privacy and Data Security

All parsing and conversion are performed locally in the browser. Keys are not uploaded to or saved on a server. The tool only identifies, converts, and exports existing keys. It does not generate new keys, recover private keys, or provide online decryption. If you do not have a key yet, use the RSA key generator.

Identify and Convert RSA Key Formats Online

Different languages, frameworks, and servers require different key formats. This tool converts existing RSA public or private keys into the structure and encoding required by the target environment.
  • Automatically detect key type and input format, or manually select PEM, DER, PKCS#1, PKCS#8, SPKI, OpenSSH, JWK, XML, raw Base64, or raw Hex
  • Select structure and encoding independently, freely combine PEM, DER, Base64, and Hex, and filter available targets by public or private key
  • Display key information including type, RSA bit length, encoding, modulus length, and public exponent
  • Extract a public key from a private key with one click and output it directly as an OpenSSH public key
  • Batch conversion: select multiple target formats and generate them at once, with each result available for separate copying or download
  • Support both text pasting and file dropping, including pem, key, pub, der, and txt files
Encrypted private keys, non-RSA keys, X.509 certificates, and PuTTY PPK files are clearly identified with handling guidance. This tool only identifies and converts existing keys; it does not generate keys, recover private keys, or perform password decryption. All parsing and conversion happen locally in the browser, and keys are never uploaded to a server.
Comments 0
No comments yet. Be the first to comment!
Comment content cannot be empty
0/255