Skip to content

EC Key Generator

Generate an elliptic curve key pair on P-256, P-384 or P-521 for ES256, ES384 or ES512 signatures, ECDH and TLS certificates. The result holds the private key as unencrypted PKCS #8 PEM, the public key as SPKI PEM, an OpenSSH ecdsa-sha2 public key line with its SHA-256 fingerprint and the RFC 7638 JWK thumbprint. Each pair is created fresh with Node's crypto module and is never stored.

Reset

Frequently asked questions

Which curve should I pick?

P-256 (also called prime256v1 or secp256r1) is the most widely supported curve and gives about 128 bit security. P-384 gives about 192 bits and is required by some government profiles such as CNSA. P-521 is the largest NIST curve and is supported less often, so choose it only when a system asks for it.

Which JWT algorithm matches each curve?

P-256 keys sign ES256, P-384 keys sign ES384 and P-521 keys sign ES512. JOSE ties each algorithm to exactly one curve, so the JWT Generator rejects a key on the wrong curve. The result lists the matching algorithm for your key.

What formats are returned?

The private key is PEM encoded PKCS #8 (BEGIN PRIVATE KEY) and the public key is PEM encoded SubjectPublicKeyInfo (BEGIN PUBLIC KEY) with the named curve. You also get the ecdsa-sha2-nistp256, nistp384 or nistp521 line that OpenSSH expects in authorized_keys.

How do I get the SEC1 form (BEGIN EC PRIVATE KEY)?

Some tools still want the older SEC1 encoding. With OpenSSL 3 run openssl pkey -in key.pem -traditional -out key-ec.pem, or openssl ec -in key.pem -out key-ec.pem. The key itself stays the same.

Can I create a certificate signing request with this key?

Yes. Save the private PEM and run openssl req -new -key key.pem -subj "/CN=example.com" -out request.csr, then check the request with the CSR Decoder. Certificate authorities accept P-256 and P-384 keys for TLS certificates.

Why are EC keys smaller than RSA keys?

Elliptic curve cryptography reaches the same security with much shorter keys, so a P-256 key is comparable to 3072 bit RSA. Signatures are shorter and signing is faster. The public key fits in 65 bytes on P-256.

Is the private key protected by a passphrase?

No, it is returned unencrypted so other tools can read it directly. Encrypt it for storage with openssl pkey -in key.pem -aes256 -out key-encrypted.pem. Never commit an unencrypted private key to a repository.

What is the JWK thumbprint used for?

The RFC 7638 thumbprint is a base64url SHA-256 hash of the key's crv, kty, x and y members. It is a stable identifier for the key that does not depend on PEM or JWK formatting, and works well as a kid in JWT headers and JWKS documents.

Is the key pair stored?

No. The pair is generated in memory for your request, returned once and never logged or saved. Copy both keys before leaving the page, because they cannot be shown again.

What does the comment field change?

It only adds a label to the end of the OpenSSH public key line, such as user@laptop, so the key is easy to recognize in authorized_keys. Fingerprints and key material stay the same. The comment can be up to 200 characters.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.