99tools

CSR Generator

runs in your browser

Make a certificate signing request and its private key in your browser: RSA or ECDSA, subject and SAN names, checked before you copy, plus the OpenSSL command.

A new key pair is made in your browser. Keep the private key: the certificate the authority issues works only with it.

Subject

Every name the certificate should cover: domains, wildcards, IP addresses or email addresses, one per line or separated by commas. Browsers check only these, not the common name.

about this tool

What a CSR is

A certificate signing request is what you send a certificate authority to get a TLS certificate. It holds three things: the public key the certificate will carry, the subject (who the certificate is for), and the alternative names, the hostnames and addresses it should cover. The whole is signed with the matching private key, which proves you hold it without sending it. The authority checks that signature, checks you control the names, and issues the certificate.

The private key is the part to guard. It is made here by your browser's own cryptography and never leaves the page; save it when the request is made, because the issued certificate works only with it.

Filling it in

  • Alternative names are the ones that matter: browsers check only these. Put every hostname in, such as example.com and www.example.com, a wildcard such as *.example.com for one level of subdomains, an IP address, or an email address for an S/MIME certificate. Internationalised domain names are written in their xn-- form, as certificates require.
  • Common name is usually the main hostname. With the box ticked it is added to the alternative names too, so nothing is left out.
  • Organisation, city, state and country matter only for organisation- and extended-validated certificates; a domain-validated certificate ignores them. The country is a two-letter code, such as GB or US.

Keys

RSA 2048 is the safe default and works everywhere. ECDSA P-256 is as strong with a far smaller key and faster handshakes. RSA 3072 and 4096 and P-384 are there for policies that require them. RSA requests are signed with SHA-256, P-256 with SHA-256 and P-384 with SHA-384.

To renew a certificate with the key you already have, choose my own private key and paste it: PKCS #8, or the older RSA PRIVATE KEY and EC PRIVATE KEY forms. It can come with other blocks around it, such as the EC PARAMETERS block openssl ecparam writes first; only the key is read, and it is used only to sign the request. RSA keys under 2048 bits are refused, as certificate authorities will not issue for them.

Checking the result

When the request is made, its signature is checked with the public key, as the authority will check it. The request is a standard PKCS #10 file: openssl req -in request.csr -noout -verify -text shows its contents, and the certificate decoder reads the certificate that comes back. The OpenSSL command beneath it makes the same request on your own machine, if you would rather the key were made there.

Limits

No key usage or other extensions are added beyond the alternative names; certificate authorities set those themselves. Ed25519 keys are not offered, since public authorities do not issue for them. Encrypted private keys must be decrypted before pasting. Nothing is uploaded.

For an SSH key pair rather than a certificate request, use the key pair generator.

questions

Is it safe to make a CSR and private key in a web page?
Here, yes: the key pair is made by your browser’s own cryptography, the request is signed in the page, and nothing is sent anywhere, so the private key exists only on your screen until you save it. If your policy says keys must never touch a browser, fill in the form, generate once to see the OpenSSL command it writes out, and run that on your own machine instead, keeping its key rather than this one.
What should go in the common name and the alternative names?
Browsers check only the alternative names (SANs), so every hostname the certificate must cover goes there: example.com, www.example.com, *.example.com for a wildcard, or an IP address. The common name is still shown in many places and some authorities expect it, so it is usually the main hostname; by default the tool copies it into the alternative names too.
RSA or ECDSA?
Both are accepted by every public certificate authority. RSA 2048 is the most widely compatible; ECDSA P-256 gives at least the same security with a much smaller key and faster handshakes, and is the better choice for a modern server. P-384 and RSA 3072 or 4096 are for policies that demand them.
Can I make a CSR for a key I already have?
Yes. Choose my own private key and paste it as PEM: PKCS #8 (BEGIN PRIVATE KEY), or the older BEGIN RSA PRIVATE KEY and BEGIN EC PRIVATE KEY forms. It is read in the page and used only to sign the request. An encrypted key needs decrypting first, as the page does not ask for passphrases.
How do I know the request is valid?
After signing, the tool checks the signature with the public key, the way a certificate authority will, and says so above the request. Requests made here open in OpenSSL with openssl req -in file.csr -noout -verify -text, which shows the subject, the names and the key.