Browser tool

CSR generator: create a key and CSR in your browser

Make a private key and a certificate signing request (CSR) with the names your certificate needs. Runs in your browser. Nothing you type or generate is sent anywhere, and this page loads no analytics.

CSR generator

Runs in your browser. Nothing you type or generate is sent anywhere.

Key type

Names

The main host name. It becomes the first Subject Alternative Name.

Browsers check the SAN, not the Common Name: add every host name the certificate must cover. Separate several with commas. A wildcard such as *.example.com covers one level only.

No names yet.

Organization details (optional)

For a DV certificate the CA keeps only the names. These fields matter for OV and EV certificates.

The ISO code: GB for the United Kingdom, not UK.

Public CAs no longer put it in certificates.

Rarely needed. Public TLS CAs leave it out.

The same with OpenSSL

This command makes the same kind of key and the same request on the machine where you run it.

openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes \
  -keyout "server.key" -out "server.csr" \
  -subj "/"

Needs OpenSSL 1.1.1 or later, in a Linux or macOS shell. In Git Bash on Windows, put MSYS_NO_PATHCONV=1 in front of it.

Best practiceGenerate the key on the server that will use it (the OpenSSL command above). Use this tool when that is hard; move the key safely and delete other copies.

How to use it

  1. Pick a key type. ECDSA P-256 suits most servers; choose RSA when a client or your CA needs it.
  2. Type the main host name as the Common Name. It becomes the first Subject Alternative Name (SAN); add every other name the certificate must cover.
  3. Fill in the organization fields only for an OV or EV certificate. For a DV certificate the CA keeps only the names.
  4. Click Generate. Download the private key (.key), with a passphrase if you like, and the CSR (.csr).
  5. Send the CSR to your CA. Keep the private key private: the CA only needs the CSR.

Questions

Is it safe to generate a private key on a website?

This page makes the key with your browser's built-in cryptography (WebCrypto). Nothing you type or generate is sent anywhere, and the page loads no analytics. Still, the best practice is to generate the key on the server that will use it, with the OpenSSL command the tool shows. Use this tool when that is hard; move the key safely and delete other copies.

Does the CA need my private key?

No. Keep the private key private. The CA only needs the CSR: it holds your public key and the names you ask for, and it is signed with the private key to prove you hold it.

Which key type should I choose?

ECDSA P-256 is fast and widely supported, and the best choice for most servers. RSA 2048 is the minimum public CAs accept; choose RSA 3072 or more for keys you keep for years. P-384 is a larger curve and is signed with SHA-384.

Why must the host name be in the SAN and not only in the Common Name?

Browsers and Go check only the Subject Alternative Name, so a certificate with its name only in the Common Name fails in Chrome, Firefox and Go. Some libraries, such as OpenSSL and Python, still fall back to the Common Name, but only when the SAN holds no DNS name. The tool copies the Common Name into the SAN for you.

How do wildcard names work?

*.example.com covers one level of names, such as www.example.com and shop.example.com, but not example.com itself or a.b.example.com. The star must be the whole left-most label, and *.com is never allowed. Add example.com as a second name if you need it.

What does the passphrase option do?

It saves the key as an encrypted PKCS #8 file (PBKDF2-HMAC-SHA256 with 600,000 iterations and AES-256-CBC). OpenSSL reads it with openssl pkey -in server.key and asks for the passphrase. Web servers then ask for it each time they start.

Does this page use analytics or cookies?

No. This page never loads analytics or the cookie banner, even if you allowed analytics elsewhere on this site, because a private key is made here. The key is kept only in this tab's memory and is cleared when you start over or leave the page.