← Back

PPK to PEM Converter

Input PPK Format

Paste your PPK private key content or upload a .ppk file

Output PEM Format

Your PEM file will appear here after conversion

Key Features

🔒

Secure Conversion

All processing happens in your browser. Your keys never leave your device.

Client-Side Only
⚡

Fast & Efficient

Quick conversion without server delays. Process keys in seconds.

🔄

Multiple Key Types

Supports RSA, DSA, and ECDSA private keys in PPK format.

📱

Cross-Platform

Works on desktop, tablet, and mobile devices with any modern browser.

Complete Guide to SSH Key Format Conversion

🔑 Understanding PPK and PEM Key Formats

SSH (Secure Shell) keys are the cornerstone of secure server authentication, allowing you to connect to remote systems without passwords. However, different SSH clients use different key file formats, which can cause confusion when moving between platforms. PPK (PuTTY Private Key) is a proprietary format developed specifically for PuTTY, the most popular SSH client for Windows. When you generate a key pair using PuTTYgen (PuTTY's key generator), it creates keys in PPK format by default. This format is optimized for PuTTY and related tools like WinSCP, FileZilla, and Pageant (PuTTY's authentication agent), making it the standard for Windows SSH users.

PEM (Privacy Enhanced Mail), despite its name, has nothing to do with email anymore—it's now the universal standard for SSH keys on Unix-like systems including Linux, macOS, and Windows Subsystem for Linux (WSL). PEM format uses base64 encoding wrapped in distinctive header and footer markers like "-----BEGIN RSA PRIVATE KEY-----". OpenSSH, the standard SSH implementation on these platforms, exclusively uses PEM format. Major cloud providers including AWS, Google Cloud Platform, Azure, and DigitalOcean all expect PEM-formatted keys for server access. Converting between these formats is essential when you generate keys on Windows with PuTTY but need to use them on Linux servers, in cloud environments, or with command-line tools.

🚀 Step-by-Step Conversion Process

Converting your PPK key to PEM format using our tool is straightforward and secure. First, you need to obtain your PPK private key file—this is typically generated when you create a new key pair in PuTTYgen and save the private key. You have two options for providing the key to our converter: you can open the .ppk file in a text editor (like Notepad or VS Code) and copy its entire contents, then paste it into the text area on the left side of our tool. Alternatively, if you prefer not to open the file, simply click the "Upload File" button and select your .ppk file directly from your file system. The tool will automatically read the file contents.

Once your PPK key is loaded, click the "Convert to PEM" button. The conversion happens instantly in your browser—your private key never travels over the internet or touches any server. Within a second, the converted PEM format will appear in the output text area on the right. You can then either copy the PEM content to your clipboard using the "Copy" button and paste it into your own file, or click "Download" to save it directly as a .pem file. Important: save this file with appropriate permissions on Unix systems using `chmod 600 converted_key.pem` to ensure only you can read it. Never share your private key with anyone, and store it securely—treat it like a password because it grants access to your servers.

🛡️ Security Best Practices and Privacy

Security is paramount when handling SSH private keys, which is why our converter is designed with privacy as the top priority. Unlike some online converters that upload your keys to remote servers for processing, our tool performs 100% client-side conversion—all processing happens directly in your web browser using JavaScript. When you paste or upload a key, it remains entirely on your computer, never transmitted anywhere. You can verify this by opening your browser's network developer tools and confirming no data is sent during conversion. This client-side architecture means you can safely convert even your most sensitive production keys without security concerns.

Beyond using our secure converter, follow SSH key security best practices: Always password-protect your private keys when generating them (though our tool handles both encrypted and unencrypted PPK files, encrypted is more secure). Store private keys in secure locations with restricted permissions—on Unix systems, use `chmod 600` to ensure only you can read the file. Never commit private keys to version control systems like Git; use .gitignore to exclude them. Consider using different keys for different purposes (one for work servers, another for personal projects) to limit damage if a key is compromised. Regularly rotate your keys—replace them every 6-12 months with newly generated pairs. Most importantly, if you suspect a private key has been compromised, immediately remove its corresponding public key from all authorized_keys files on servers it accesses, then generate and deploy a new key pair.

☁️ Using Converted Keys with Cloud Providers

Modern cloud platforms are the primary reason many users need to convert PPK to PEM. Amazon Web Services (AWS) EC2 instances, when launched, require you to select or provide an SSH key pair for authentication. If you generated your key with PuTTY on Windows, you'll need to convert it to PEM before importing it to AWS. Similarly, Google Cloud Platform's Compute Engine, Microsoft Azure's Virtual Machines, and DigitalOcean Droplets all expect PEM-formatted keys. When you convert your PPK key using our tool and download the PEM file, you can upload it to these cloud consoles in the SSH keys management section.

After uploading your PEM key to a cloud provider, you'll use it to SSH into your instances. On Linux or macOS, use the command: `ssh -i /path/to/converted_key.pem username@server-ip`. On Windows with WSL, the same command works. Remember that cloud providers often use specific usernames depending on the OS: AWS Ubuntu instances use "ubuntu", Amazon Linux uses "ec2-user", Google Cloud uses your email username. If your PEM key was originally encrypted in PPK format, you'll be prompted for the passphrase when connecting. Many developers maintain a ~/.ssh/ directory containing all their keys, using SSH config files to specify which key to use for which servers automatically—this streamlines the connection process when managing multiple cloud environments.

🔄 Understanding Different SSH Key Types

Not all SSH keys are created equal—the type of cryptographic algorithm used significantly impacts security and compatibility. RSA (Rivest-Shamir-Adleman) is the oldest and most widely supported SSH key type, using key sizes typically of 2048 or 4096 bits. Most legacy systems and older SSH implementations require RSA, making it the most compatible choice. However, RSA with 2048 bits is increasingly considered less secure for sensitive applications—security experts now recommend 3072 or 4096-bit RSA keys for better protection. Our converter fully supports RSA keys of any size, correctly preserving the key length during conversion from PPK to PEM.

Modern alternatives include ECDSA (Elliptic Curve Digital Signature Algorithm) and Ed25519, both offering superior security with smaller key sizes. ECDSA keys using the P-256, P-384, or P-521 curves provide equivalent security to much larger RSA keys while being faster to compute. Ed25519, based on the Curve25519 elliptic curve, is currently considered the gold standard for SSH keys—offering excellent security, small key size (256 bits), and blazing-fast performance. Our converter handles ECDSA and Ed25519 keys seamlessly, though note that very old SSH servers might not support these newer formats. When choosing a key type, consider your requirements: use RSA-4096 for maximum compatibility with legacy systems, ECDSA for a balance of security and compatibility, or Ed25519 for modern environments where you control both client and server.

🔧 Troubleshooting Common Conversion Issues

If the converter reports that your PPK file is invalid or malformed, first verify you've copied the complete key contents. PPK files must begin with "PuTTY-User-Key-File-2:" or "PuTTY-User-Key-File-3:" (for newer PuTTY versions) and contain all sections including the encryption type, comment, public key lines, private key lines, and the private MAC. Missing even one line will break the conversion. Make sure you didn't accidentally truncate the file when copying. If you uploaded a file, ensure it's actually a .ppk file and not a .pub (public key) file—public keys cannot be converted to PEM private keys because they don't contain the secret key material.

Another common issue arises with encrypted (password-protected) PPK files. While our tool can process the structure of encrypted keys, the actual decryption requires the passphrase. If you generated your key with a password in PuTTYgen, you have two options: either load the key into PuTTYgen, enter your passphrase, then save it as an unencrypted PPK (temporarily, for conversion purposes), or use PuTTYgen's built-in export feature to save directly as OpenSSH format (which is PEM-compatible). If you've lost the passphrase for an encrypted key, unfortunately there's no way to recover it—the encryption is strong enough that brute-force attacks are impractical. Your only option is to generate a new key pair and update the public key on all servers where the old key was authorized.

💻 Setting Up Keys on Different Operating Systems

After converting your PPK to PEM, the next step is configuring it for use on your operating system. On Linux and macOS, create a .ssh directory in your home folder if it doesn't exist (`mkdir -p ~/.ssh`), then save your PEM file there (e.g., `~/.ssh/mykey.pem`). Critically important: set proper permissions with `chmod 700 ~/.ssh` and `chmod 600 ~/.ssh/mykey.pem`. SSH refuses to use keys with overly permissive access rights because it's a security risk. You can then connect with `ssh -i ~/.ssh/mykey.pem user@hostname`. For frequent use, add the key to your SSH agent (`ssh-add ~/.ssh/mykey.pem`) so you don't need to specify it with -i every time.

On Windows 10/11, you have multiple options. Windows Subsystem for Linux (WSL) works identically to Linux—just save your PEM key in the WSL filesystem and use chmod to set permissions. For native Windows, the built-in OpenSSH client (enabled via Windows Features) stores keys in `C:\Users\YourName\.ssh\`. Unlike Unix, Windows doesn't use chmod; instead, right-click the .pem file, select Properties → Security → Advanced, disable inheritance, remove all users except yourself, and grant yourself full control. Alternatively, use PuTTY itself—while it can't directly use PEM files, you can convert back to PPK using PuTTYgen's import function if needed. Modern PuTTY versions can also use PEM files if you load them through Pageant (PuTTY's authentication agent).

📋 Best Practices for Key Management

Effective SSH key management is crucial for both security and operational efficiency, especially when managing multiple servers or working in teams. Adopt a consistent naming convention for your keys that includes the purpose and date, such as `aws-production-2026-01.pem` or `github-personal-2026.pem`. This makes it immediately clear which key is for what purpose. Store all your keys in the standard ~/.ssh/ directory (or Windows equivalent) and use an SSH config file (`~/.ssh/config`) to map keys to specific hosts automatically. This eliminates the need to remember which key goes with which server and prevents accidentally using the wrong key.

Implement a key rotation schedule—treat SSH keys like passwords that should be changed periodically. Generate new key pairs every 6-12 months, deploy the new public keys to your servers, verify they work, then remove the old public keys and delete the old private keys. Maintain a secure backup of critical keys in an encrypted password manager like 1Password, Bitwarden, or LastPass—these tools can securely store files, not just passwords. For team environments, never share private keys; instead, each team member should generate their own key pair and add their public key to servers. Use bastion hosts or jump servers for additional security layers. Finally, audit your authorized_keys files periodically to remove public keys for former employees or unused keys—abandoned keys are a common security vulnerability.

Format Examples

PPK Format Example:
PuTTY-User-Key-File-2: ssh-rsa Encryption: none Comment: rsa-key-20231010 Public-Lines: 4 AAAAB3NzaC1yc2EAAAADAQABAAABAQDLAaOC9wRBw6W+j5Y9l7vL7X7p7X7p 7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p 7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p 7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p Private-Lines: 10 MIIEogIBAAKCAQEAywGjgvcEQcOlvo+WPZe7y+1+6e1+6e1+6e1+6e1+6e1+ ... Private-MAC: 6a8f7b9c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8
PEM Format Example:
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAywGjgvcEQcOlvo+WPZe7y+1+6e1+6e1+6e1+6e1+6e1+ 6X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p 7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p7X7p ... -----END RSA PRIVATE KEY-----

Frequently Asked Questions

Is it safe to use this online converter for my private keys?
Absolutely. This tool is specifically designed with security as the top priority. Unlike many online converters that upload your data to servers, our converter performs 100% client-side processing—all conversion happens directly in your web browser using JavaScript. Your private key never leaves your computer or travels over the internet. You can verify this by opening your browser's developer tools (F12) and checking the Network tab during conversion—you'll see zero network requests. For maximum security-conscious users, you can even save this webpage locally and use it offline. The source code is visible, transparent, and can be audited. That said, if your security policy prohibits any web-based tool usage, consider using PuTTYgen's built-in export feature or command-line tools like ssh-keygen for conversion.
Can I convert PEM back to PPK format?
While this tool specializes in PPK-to-PEM conversion (the most common direction), converting PEM back to PPK is absolutely possible using PuTTYgen, PuTTY's key generator tool. Open PuTTYgen, go to Conversions → Import Key, select your PEM file, enter the passphrase if it's encrypted, then click "Save private key" to export as PPK format. This is useful when you have PEM keys (perhaps generated with ssh-keygen on Linux) but need to use them with PuTTY on Windows. PuTTYgen can handle RSA, DSA, ECDSA, and Ed25519 keys in PEM format. Note that for ongoing work, most modern tools including recent PuTTY versions can directly use PEM keys, so converting to PPK is becoming less necessary unless you're using older software.
What's the difference between PPK-2 and PPK-3 formats?
PPK-2 (PuTTY-User-Key-File-2) was the standard format for years, while PPK-3 (PuTTY-User-Key-File-3) is a newer format introduced in PuTTY 0.75 (2021) with improved security. The main differences: PPK-3 uses Argon2 for key derivation instead of SHA-1, providing better protection against brute-force attacks on encrypted keys. It also defaults to stronger encryption (AES-256-CBC instead of AES-256-CFB). PPK-3 stores additional metadata and uses a more robust MAC algorithm. Our converter supports both formats seamlessly—the resulting PEM format is identical regardless of which PPK version you start with. If you're generating new keys, use modern PuTTY versions to create PPK-3 format for better security. Older PuTTY versions (pre-0.75) can't read PPK-3 files, so if you need backward compatibility, explicitly choose PPK-2 when saving in PuTTYgen.
Why does my converted PEM key not work with my server?
Several issues could cause PEM key authentication failures. First, verify file permissions—on Unix systems, private keys must have 600 permissions (readable/writable only by owner). SSH will refuse to use keys with looser permissions as a security measure. Use `chmod 600 /path/to/key.pem` to fix this. Second, ensure the corresponding public key is correctly installed on the server in ~/.ssh/authorized_keys with proper permissions (700 for ~/.ssh directory, 600 for authorized_keys file). Third, check that you're using the correct username—cloud providers use specific usernames like "ubuntu" for Ubuntu instances or "ec2-user" for Amazon Linux. Fourth, verify the key type is supported—very old SSH servers might not support ECDSA or Ed25519 keys. Finally, check SSH daemon configuration on the server (/etc/ssh/sshd_config) to ensure PubkeyAuthentication is enabled. Use `ssh -v` for verbose output to see exactly where authentication fails.
Can this tool handle password-protected (encrypted) PPK files?
Our converter can parse the structure of encrypted PPK files and will identify them as password-protected, but it cannot decrypt them without the passphrase. This is by design—requiring the passphrase in a web tool would introduce security concerns about how passphrases are handled. For encrypted keys, you have two options: First, use PuTTYgen to load your encrypted PPK (it will prompt for the passphrase), then export it as OpenSSH format which produces a PEM file. Second, temporarily decrypt the key by loading it in PuTTYgen and saving as an unencrypted PPK (select "No" when asked about passphrase protection), convert it using our tool, then delete the unencrypted version. We recommend the first approach as it never creates an unencrypted private key file. Note that the resulting PEM file can also be encrypted—when saving from PuTTYgen to OpenSSH format, you can choose to protect it with a passphrase.
What's the relationship between public and private keys?
SSH key pairs consist of two mathematically related but distinct files: the private key (which you're converting from PPK to PEM) and the public key. The private key is secret—like a password—and must never be shared or exposed. It stays on your local computer and proves your identity. The public key, on the other hand, is designed to be shared freely—you place copies on every server you want to access, typically in ~/.ssh/authorized_keys. The cryptographic magic is that data encrypted with the public key can only be decrypted with the corresponding private key, and vice versa. When you SSH to a server, your SSH client uses your private key to prove you possess the private key matching the public key the server has on file, without ever transmitting the private key itself. This asymmetric encryption is why SSH keys are more secure than passwords—the secret (private key) never travels over the network, so it can't be intercepted.
Do I need to convert both the private and public key?
You only need to convert the private key from PPK to PEM. Public keys have a different, simpler format that's already compatible across systems. When you generate a key pair in PuTTYgen, you get a .ppk file (private key) and PuTTYgen displays the public key in the "Public key for pasting into OpenSSH authorized_keys file" box. This public key text starts with "ssh-rsa" or similar and is identical whether you're using PuTTY or OpenSSH—no conversion needed. Simply copy this public key text and paste it into ~/.ssh/authorized_keys on your servers. If you only have the PPK private key and need to extract the public key later, you can load the PPK into PuTTYgen and it will display the public key, or use ssh-keygen on Linux: `ssh-keygen -y -f converted_key.pem > public_key.pub` to extract the public key from your converted PEM private key.
How do I use the converted PEM key with Git/GitHub/GitLab?
Using converted PEM keys with Git hosting services is straightforward but requires a few steps. First, extract the public key from your converted PEM private key using: `ssh-keygen -y -f converted_key.pem > github_key.pub`. Then, copy the contents of github_key.pub and add it to your GitHub/GitLab account in Settings → SSH and GPG keys → New SSH key. For the private key setup, save your converted PEM file to ~/.ssh/ with a descriptive name like `~/.ssh/github_key.pem` and set permissions with `chmod 600 ~/.ssh/github_key.pem`. Configure Git to use this key by adding to ~/.ssh/config: "Host github.com / IdentityFile ~/.ssh/github_key.pem". Now Git operations (clone, push, pull) will automatically use this key. For multiple Git accounts (work and personal), use different Host aliases in the SSH config and specify the appropriate host in your Git URLs.
What should I do if I suspect my private key has been compromised?
If you believe your private key has been compromised or exposed, act immediately to minimize potential damage. First, access every server that has the corresponding public key and remove it from ~/.ssh/authorized_keys—this prevents the compromised key from being used for authentication. If you manage many servers, use configuration management tools (Ansible, Chef, Puppet) to remove the public key across all systems simultaneously. Second, if the key was used for cloud services (AWS, GCP, Azure), log into each console and delete the key from the SSH keys management section. Third, review access logs on affected servers (/var/log/auth.log on Linux) for any suspicious login activity around the time of suspected compromise. Fourth, generate a new, completely fresh key pair—don't just change the passphrase on the compromised key, generate new keys from scratch. Finally, deploy the new public key to all servers and services, verify it works, then securely delete all copies of the compromised private key. Going forward, use passphrase-protected keys and consider hardware security keys (like YubiKey) for highly sensitive access.
Can I use the same key for multiple servers and services?
While technically you can use a single SSH key pair for everything, security best practices recommend using different keys for different purposes. Using one key for all servers creates a single point of failure—if that key is compromised, attackers gain access to everything. Instead, consider a tiered approach: generate one key for production servers, another for development/staging, another for personal projects, and yet another for Git hosting services. This limits the blast radius if one key is compromised. Additionally, different keys make it easier to rotate credentials—when leaving a job, you only need to regenerate and update work-related keys, leaving personal keys intact. Modern SSH clients can manage many keys effortlessly using ssh-agent and SSH config files with Host-specific IdentityFile directives. The small inconvenience of managing multiple keys is vastly outweighed by the security benefits. If you must use one key for convenience, at minimum separate your most critical production access from everything else.