Private key passphrase: remove, change, convert

Runs in your browser

Paste an encrypted private key (PEM, OpenSSH or PuTTY) and its passphrase. Get it without passphrase, with a new one, or in another format. Nothing leaves your browser.

Waiting for input

Paste the key and its passphrase

PKCS#8 (ENCRYPTED PRIVATE KEY), the old OpenSSL format (Proc-Type: 4,ENCRYPTED), OpenSSH and PuTTY .ppk. Keys without passphrase open too, for converting.

Examples

Start from an example

Each example fills in the tool above and decrypts it. All keys and passwords are demo values made for this page.

The formats

How a passphrase protects a private key

FormatLooks likeProtection
PKCS#8-----BEGIN ENCRYPTED PRIVATE KEY-----PBES2: AES-256-CBC with PBKDF2 (OpenSSL 3), or old PKCS#12 ciphers (3DES, RC2)
Old OpenSSL (PKCS#1, SEC1)Proc-Type: 4,ENCRYPTED and DEK-InfoAES or 3DES, key from the passphrase with a single round of MD5: weak, easy to brute-force
OpenSSH-----BEGIN OPENSSH PRIVATE KEY-----AES-256-CTR, key from bcrypt_pbkdf (16 to 100 rounds)
PuTTY .ppkPuTTY-User-Key-File-3Version 3: AES-256-CBC, key from Argon2id. Version 2: SHA-1, weak
In your terminal

The same with openssl, ssh-keygen and puttygen

PEM, remove
openssl pkey -in encrypted.pem -out plain.pem
PEM, new passphrase
openssl pkey -in plain.pem -aes256 -out encrypted.pem
OpenSSH
ssh-keygen -p -f ~/.ssh/id_ed25519          # change or remove
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa       # write as PEM
PuTTY
puttygen key.ppk -O private-openssh -o id_ed25519
puttygen id_ed25519 -o key.ppk
Common errors

When the key won’t load

bad decrypt / incorrect passphrase

Wrong passphrase. OpenSSH and PuTTY 3 check it with a MAC or check bytes, so “wrong” is certain; the old OpenSSL format can only tell from the result.

Load key: invalid format

An OpenSSH program got a PPK or PEM file it doesn’t read. Convert it here.

Server refused our key (PuTTY)

Often the key is fine but PuTTY needs .ppk. Convert the OpenSSH key on this page.

Old format, weak protection

Proc-Type 4,ENCRYPTED keys use one round of MD5: a passphrase can be guessed quickly. Save them again as PKCS#8 or OpenSSH.

Under the hood

Tested against the original tools

Every format on this page was checked against values made by the real tool, on 3 December 2026:

  • 11 keys from ssh-keygen (Ed25519, RSA, ECDSA, with and without passphrase), openssl (PKCS#8 with AES-256 and 3DES, the old format with AES-128 and 3DES) and puttygen (.ppk version 2 and 3); fingerprints must match ssh-keygen.
  • Keys written here (PEM, OpenSSH with bcrypt, PPK with Argon2id) open with openssl, ssh-keygen and puttygen.
More formats

Other encrypted formats

Every format has its own page with the same tool. Paste anything into one of them: if it belongs elsewhere, the tool says so and takes it there.

FAQ

Questions about Private key passphrase

How do I remove the passphrase from a private key?

Open the key above with its passphrase: the first result is the key without passphrase in PEM. In a terminal: openssl pkey -in key.pem -out plain.pem, or ssh-keygen -p for OpenSSH keys.

How do I convert a PPK to PEM or OpenSSH?

Paste the .ppk and its passphrase: you get PEM, OpenSSH and the public key. The other way round: open a PEM or OpenSSH key and choose PuTTY on the “New passphrase” tab.

Is a key without passphrase dangerous?

Whoever gets the file can use it. On a server that starts without a person present it is often necessary; on a laptop, keep the passphrase and use ssh-agent.

Is it safe to paste a private key here?

Everything runs in your browser: nothing you paste is sent anywhere, not even to this site. The page’s Content-Security-Policy blocks connections to other sites; check the Network tab of your browser’s developer tools. For keys that guard production systems, the commands above do the same locally.

Searches the list of pages on this site. What you type stays in your browser.