By Tim King · Updated
SSH Key Converter
Fingerprint Check to Confirm the Same Key After OpenSSH, PuTTY and PKCS#1 Conversion
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the SSH Key Converter works
This SSH key converter turns a public key from one format into another: OpenSSH one-line keys, RFC 4716 SSH2 blocks, PEM SPKI and PEM PKCS#1. It detects the input format for you and shows the SHA256 fingerprint of the result so you can confirm nothing changed but the wrapping.
What the SSH key converter changes
Every format holds the same public numbers. OpenSSH puts the key type, base64 blob and comment on one line
for authorized_keys. RFC 4716, the SSH2 format from PuTTYgen and commercial SSH servers, wraps the same
blob between ---- BEGIN SSH2 PUBLIC KEY ---- lines with an optional quoted comment. PEM SPKI is the
BEGIN PUBLIC KEY form that OpenSSL, Java and most libraries read, and PKCS#1 is the older RSA-only
BEGIN RSA PUBLIC KEY form.
The converter handles RSA, Ed25519 and ECDSA on P-256, P-384 and P-521. It is the browser equivalent of
ssh-keygen -e -m PKCS8 and ssh-keygen -i -m PKCS8. Leave the comment blank to keep the original one.
FAQ
How do I convert a PuTTY public key for authorized_keys?
Paste the SSH2 block PuTTYgen saves, starting with ---- BEGIN SSH2 PUBLIC KEY ----, and choose OpenSSH.
The result is one line you can append to ~/.ssh/authorized_keys. The PuTTY private key file (.ppk) is a
different thing and needs PuTTYgen itself.
Why can't Ed25519 be converted to PKCS#1?
PKCS#1 only defines RSA keys, so there is no PKCS#1 form for Ed25519 or ECDSA. Choose PEM SPKI instead, which is the general public key container that every modern library reads for all three key types.
Does converting change the fingerprint?
No. The fingerprint is a hash of the key blob, which every format carries unchanged, so the fingerprint shown under the result matches the one for your original key. If they ever differ, the input was a different key.
See also: all Data & Code tools, Units, Images, Audio & Video, Documents.
Related tools
SSH Key Fingerprint
Get ssh-keygen style SHA256 and MD5 fingerprints from any public key.
PEM To JWK Converter
Convert public and private keys between PEM and JWK.
PEM Inspector
Decode PEM and DER into a readable ASN.1 tree.
RSA Key Generator
RSA key pairs as PEM or JWK, made in your browser.
BPM To Milliseconds Calculator
Tempo to delay times in ms and Hz for every note value, and back.