CSR generator

Make a private key and certificate signing request in your browser.

The generator needs JavaScript. This command makes the same key and request on your own computer:

Make it with OpenSSL instead

Replace the example names with yours.

openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes \
  -keyout 'www.example.com.key' -out 'www.example.com.csr' \
  -subj '/CN=www.example.com' \
  -addext 'subjectAltName=DNS:www.example.com,DNS:example.com'

To get a certificate from a certificate authority, you send them a CSR: a request holding your public key and the names you want covered, signed with the matching private key. Usually that means an OpenSSL command with flags few people remember. This generator makes the key and the request in your browser instead, with the same result.

How to use it

  1. Choose a key type. ECDSA P-256 is the right choice for almost every server today.
  2. Enter the main domain name, such as www.example.com. It becomes the request's common name and the first of its names.
  3. Add any other names the certificate should cover, one per line, such as example.com or mail.example.com.
  4. Open "Organization details" only if you're ordering an organization-validated certificate. Domain-validated certificates, the usual kind, ignore them.
  5. Choose Generate. A moment later you get the CSR, ready to copy or download, and a button to download the private key.

Download the key before you leave the page. It is shown nowhere else and can't be recovered; if it is lost, make a new key and request.

What's in the request

The CSR holds your public key, a subject with the common name and any organization details you gave, and a request for a Subject Alternative Name list with every name you entered. The common name is always in that list too, because browsers read only the list. International names are converted to the ASCII form certificates use, so bücher.example.com becomes xn--bcher-kva.example.com. A wildcard is allowed as the whole first label only, as in *.example.com.

The request is signed with your new key using SHA-256: ECDSA for an elliptic curve key, PKCS#1 version 1.5 for RSA. That is what every public certificate authority expects. The key is saved in the standard PKCS#8 format, which nginx, Apache, HAProxy, Caddy and most other servers read directly.

Your key never leaves the browser

The key pair comes from your browser's built-in WebCrypto, the same cryptography it uses for HTTPS. We build and sign the request with our own small encoder in the page, with no third-party code. Nothing is sent to our servers or anywhere else: once the page has loaded, generating and downloading make no network request at all. The key isn't written to local storage, session storage or cookies. It lives in the page's memory until you choose Start over or close the tab, and it reaches your disk only when you choose "Download key".

If you'd rather the key never touched a browser, the page shows the OpenSSL command that makes the same request on your own server. It updates as you type, so you can copy it with your names already filled in. Without JavaScript the page shows that command instead of the generator.

After you generate

Copy the CSR, or download it as a .csr file, and paste it into your certificate authority's order form. Choose "Decode this CSR" to open it in the certificate decoder first and read back exactly what you are asking for: names, key and signature. Only the request is handed over, never the key.

Keep the key file on the server that will use the certificate, readable only by the account that runs the web server. Don't email it or paste it into a website; if that ever happens, make a new key and request and replace the certificate.

When the certificate arrives, install it with this key and the intermediate certificates your authority provides, then check the live result with the SSL checker.

Common problems

A certificate authority rejects a request whose names it can't validate, so check every name for typos before you generate. A name with an IP address won't work here; public certificates for addresses are rare and need a different process. If your authority asks for an organizational unit or an email address, it may be using an old form: those fields are no longer accepted for public server certificates. And if the authority says the request doesn't match the key, make both again together: a request is always tied to the key that signed it.

Questions

Is my private key sent to you?
No. The key is made by your browser's built-in cryptography and stays in the page until you download it. Nothing is uploaded, nothing is stored in the browser, and the page makes no network request while it generates. Start over, or leave the page, and the key is gone.
ECDSA or RSA?
Choose ECDSA P-256 unless something in your setup needs RSA. Every public certificate authority and every current browser accepts it, and its keys are smaller and faster. Pick RSA 2048 for very old clients or appliances, or RSA 3072 if a policy asks for a longer RSA key.
Why are there no organizational unit or email fields?
Public certificate authorities no longer accept an organizational unit, and an email address in the subject belongs to personal certificates, not server certificates. Leaving them out avoids a rejected request.
Can I make a wildcard CSR?
Yes. Enter *.example.com as the domain name. A wildcard covers one level only, so *.example.com covers www.example.com but not example.com itself or a.b.example.com; add example.com as another name if you need it.
What do I do with the files?
Send the CSR to your certificate authority, usually by pasting it into their order form. Keep the key file on the server that will use the certificate, readable only by that server. When the certificate arrives, install it together with that key.