# SSH Key Converter

Convert SSH keys between OpenSSH, PKCS#8 PEM, PKCS#1 PEM and RFC 4716 formats, and derive the public key from a private key. Paste an RSA, ECDSA or Ed25519 key, enter the passphrase if the private key is encrypted, and choose the output format.

## Frequently asked questions

### Which formats can I convert between?

OpenSSH (the one-line ssh-rsa or ssh-ed25519 public key and the BEGIN OPENSSH PRIVATE KEY block), PKCS#8 PEM, PKCS#1 PEM for RSA keys, and RFC 4716, the SSH2 public key format used by some commercial SSH servers.

### How do I get the public key from a private key?

Paste the private key and tick public key only. The tool outputs the matching public key in the chosen format, for example the line to add to authorized_keys when you choose OpenSSH.

### Can I convert encrypted private keys?

Yes, if you enter the passphrase. The converted private key is written without encryption, so protect it again with ssh-keygen -p or your key manager before storing it.

### Which key types are supported?

RSA, ECDSA (P-256, P-384, P-521) and Ed25519. PKCS#1 exists only for RSA, so choose PKCS#8 or OpenSSH for the other types.

### Why convert SSH keys at all?

Tools differ in what they accept: libraries and cloud consoles often want PEM, OpenSSH wants its own format, and some appliances expect RFC 4716. Converting keeps the same key working everywhere.

### Is my private key stored?

No. The key and the passphrase are used for this request only, and the input is not echoed in the result. Pasting private keys into any online tool is a risk, so prefer ssh-keygen locally for keys that protect production systems.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
