jsonecho

Key Pair Generator

Create a public and private key pair in PEM format for APIs, signing and tests.

Loading the tool...

How to use Key Pair Generator

  1. Choose the key type.
  2. Click Generate to make a new pair.
  3. Copy the private and public keys into separate files.

About Key Pair Generator

Many APIs ask for a public key, and many signing schemes need a private one. This tool creates a fresh pair with the Web Crypto API of your browser. The private key is shown in PKCS#8 format and the public key in SPKI format, both as PEM text you can copy into a file.

The keys are created on your device and are never sent to a server. Even so, keep a private key secret, and for production systems prefer keys made on the machine that will use them. RSA 4096 can take a few seconds to generate.

Frequently asked questions

Are the keys sent to your server?

No. They are generated in your browser and leave the page only when you copy them.

RSA or EC, which one should I pick?

EC P-256 gives strong security with short keys and is fast. RSA 2048 is the most widely supported. Choose what the service you use asks for.

Which format are the keys in?

The private key is PKCS#8 (BEGIN PRIVATE KEY) and the public key is SPKI (BEGIN PUBLIC KEY). Most tools and libraries read both.

Can I use these keys for SSH?

No. SSH uses a different public key format. These keys are meant for signing, JWT and API use.

More in URL and Base64

All tools →