CodeBrowser

We earn commissions when you shop through the links below. Learn more

SSH Key Converter: PPK to OpenSSH and Back

Convert a PuTTY .ppk key to OpenSSH format, or an OpenSSH or .pem key to PuTTY .ppk, without installing PuTTYgen. Paste your key or choose the file, and download the converted private and public keys.

PPK ↔ OpenSSHAWS .pem to .ppkEd25519, RSA & ECDSARuns in your browser

Your key is converted in your browser and never uploaded. Still, only paste private keys into tools you trust, and never share them.

What it does

Three conversions in one tool

PuTTY .ppk to OpenSSH

Use a key made in PuTTYgen with the ssh command, Git, VS Code, macOS or Linux. Works with PPK version 2 and 3 files.

OpenSSH to PuTTY .ppk

Turn an id_ed25519 or id_rsa key into a .ppk file for PuTTY, WinSCP or FileZilla.

AWS .pem to .ppk

Convert the .pem key pair you downloaded from AWS EC2, Lightsail or another cloud into a .ppk file for PuTTY.

The converter detects the format automatically, shows the key type and fingerprint so you can confirm it’s the right key, and gives you the matching public key too. Keys protected with a passphrase need it removed first; the tool shows you exactly how.

With PuTTYgen

How to convert keys with PuTTYgen on Windows

Convert a .ppk to OpenSSH

  1. Open PuTTYgen and click Load.
  2. Change the file filter to All Files (*.*) if needed, and open your .ppk file.
  3. Go to Conversions → Export OpenSSH key.
  4. Save the file with no extension, for example id_ed25519.

Convert OpenSSH or .pem to .ppk

  1. Open PuTTYgen and click Load.
  2. Choose All Files (*.*) and open your OpenSSH key or .pem file.
  3. Click OK on the import notice.
  4. Click Save private key and give it a .ppk name.

Command line

Convert keys on Mac and Linux with puttygen

Install the command-line version of PuTTYgen with sudo apt install putty-tools on Debian and Ubuntu, or brew install putty on a Mac. It also handles keys that have a passphrase.

PPK to OpenSSH private key

puttygen key.ppk -O private-openssh -o id_ed25519

OpenSSH or .pem to PPK

puttygen id_ed25519 -o key.ppk

Get the public key from a .ppk

puttygen key.ppk -O public-openssh -o id_ed25519.pub

Get the public key from a .pem

ssh-keygen -y -f key.pem > key.pub

PPK versions

PPK version 2 vs version 3

PuTTY 0.75 (released in 2021) introduced PPK version 3, which protects passphrase-encrypted keys with the stronger Argon2 algorithm. PuTTYgen now saves version 3 by default.

Older apps, including older versions of PuTTY, WinSCP and FileZilla, only understand version 2. If you’re not sure, version 2 works everywhere for keys without a passphrase.

Fixing “PuTTY key format too new”

This error means an older app is trying to open a version 3 .ppk file. Two easy fixes:

  • Convert the key above and choose Version 2.
  • In PuTTYgen, load the key, open Key → Parameters for saving key files, set PPK file version to 2, and save it again.

Or update the app: current versions of PuTTY, WinSCP and FileZilla read both formats. Looking for a newer client? See the best SSH clients.

Need a server?

Put your converted key to work

Most VPS hosts let you paste your public key when you create a server, so you can log in with PuTTY or OpenSSH right away.

Best overall

DigitalOcean

Simple cloud servers with great docs. Add your SSH key when you create a Droplet.

From about $4/month

View DigitalOcean deals
Most RAM for the money

Hostinger

4 GB of RAM and NVMe storage on the entry VPS plan, with an easy control panel.

From about $6.49/month on a 24-month term

View Hostinger deals
Best budget

RackNerd

Yearly KVM VPS deals for about the price of one month elsewhere. Great for learning.

From about $11/year on promo

View RackNerd deals

Prices are approximate. Compare all VPS hosts, including Vultr and ShockHosting.

FAQ

Key conversion questions, answered

Is it safe to convert my private key online?

This converter runs entirely in your browser, so the key is never sent to a server. That said, the safest option for keys that protect important servers is always to convert them on your own machine with PuTTYgen or puttygen.

What is the difference between .ppk and .pem files?

A .ppk file is PuTTY’s own key format. A .pem file is a standard text format used by OpenSSL and cloud providers like AWS. OpenSSH tools such as ssh, scp and Git can use .pem keys directly, while PuTTY needs a .ppk file.

Can I convert a key that has a passphrase?

Not in the browser. Remove the passphrase from a copy of the key first, or use PuTTYgen or the puttygen command, which can read and write passphrase-protected keys directly.

Does converting a key change it?

No. The key itself stays exactly the same; only the file format changes. The fingerprint before and after conversion is identical, so servers that trusted the old file will accept the new one.

Which key types are supported?

Ed25519, RSA and ECDSA (nistp256, nistp384 and nistp521) keys. Old DSA keys are not supported because modern SSH servers no longer accept them.

Where do I put the converted OpenSSH key?

Save it in your .ssh folder (~/.ssh on Mac and Linux, C:\Users\YourName\.ssh on Windows) and on Mac or Linux run chmod 600 on it so only you can read it.

Starting from scratch instead?

Learn how to create a new SSH key with ssh-keygen or PuTTYgen on Windows, Mac and Linux, step by step.

How to generate an SSH key