Skip to content
Aarrange

CSR Decoder

Paste a CSR and see its names, key and signature, with the problems a CA rejects. Nothing leaves your browser.

0
Requests
0
SANs
0
Errors
Input
Tab types a tab. Press Escape, then Tab, to leave the editor.
Result
The result shows here as you type.Try , or .
On this page

About CSR Decoder

Updated

What is a CSR Decoder?

A CSR Decoder reads a certificate signing request and shows what the CA will see. That is the subject, the names, the key and the extensions you ask for. This one also checks the signature. It finds the problems that make a CA reject the CSR or issue the wrong certificate. Check the CSR here before you send it, so you do not wait a day for a certificate with a missing name. It decodes in your browser, so the CSR never leaves your computer.

How to use this tool

Paste the CSR, or drop a .csr, .req or .pem file. The Result pane opens on Requests, with one card per CSR. Text prints it as openssl req -text does, and ASN.1 shows the raw structure as a tree. Fix PEM repairs the formatting: five dashes, line breaks written as \n, and Base64 with no BEGIN line. To decode the certificate the CA sends back, use the Certificate Decoder.

What the colours mean

A broken PEM is marked at the exact line and column, with the reason and the fix. A note with an orange triangle means a CA rejects the CSR. The signature does not match, or the RSA key is shorter than 2048 bits. A note with an outline triangle is a risk to look at: no SAN, a SHA-1 signature, or a challenge password.

Customization

Open Options to write fingerprints as AA:BB or aabb. The tool remembers your choice.

Common CSR errors

No Subject Alternative Name

Old guides make a CSR with the name only in the common name. Browsers read only the SANs. Most CAs copy the CN into a SAN, but do not count on it. Put the names in the CSR:

Invalid
openssl req -new -key example.key -subj "/CN=example.com" -out example.csr

Add each name with -addext (openssl 1.1.1 or newer):

Fixed
openssl req -new -key example.key -subj "/CN=example.com" \
  -addext "subjectAltName=DNS:example.com,DNS:www.example.com" -out example.csr

A key that is too short

CAs reject RSA keys shorter than 2048 bits. A key made with an old default is often 1024 bits:

Invalid
openssl genrsa -out example.key 1024

Make a new key of 2048 bits or more, or an EC key, then a new CSR:

Fixed
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out example.key

The CSR copied with line breaks lost

A CSR pasted through a chat or a web form can lose its line breaks or get \n as text. The CA's form then says that the CSR is not valid:

Invalid
-----BEGIN CERTIFICATE REQUEST-----\nMIIBDTCBtAIBADA...\n-----END CERTIFICATE REQUEST-----

Put back real line breaks, or press Fix PEM:

Fixed
-----BEGIN CERTIFICATE REQUEST-----
MIIBDTCBtAIBADA...
-----END CERTIFICATE REQUEST-----

Certificate signing requests

A CSR uses the PKCS #10 format. It has three parts. The first is the request info: the subject, the public key and the attributes. Then come the signature algorithm and the signature. The CA always takes the public key from the CSR. Many CAs also take the names from it, but some use the names on the order form. Many CAs also make the rest of the subject themselves. For a DV certificate, it checks only that you control the domain. For OV and EV certificates, it also checks the organization.

The fields

  • Subject: the common name (CN). For OV and EV, also the organization (O), the city (L), the state (ST) and the country (C).
  • Public key: the key the certificate will hold. The private key stays with you.
  • Requested extensions: mostly the SAN list. It can also ask for Key Usage and Extended Key Usage.
  • Challenge password: an old attribute for revoking a certificate. It is sent in plain text, and most CAs ignore it.

Make a CSR

Make the key and the CSR in one command. The key is written to example.key, and you keep it:

Bash
openssl req -new -newkey rsa:2048 -noenc -keyout example.key \
  -subj "/CN=example.com" -addext "subjectAltName=DNS:example.com,DNS:www.example.com" \
  -out example.csr

-noenc writes the key with no password, so a web server can read it. OpenSSL 1.1.1 does not know -noenc: write -nodes there.

The CSR is PEM text: DER in Base64 between BEGIN and END lines (RFC 7468).

Other CSR resources

CSR Decoder FAQ

What is a CSR?

A CSR, or certificate signing request, is the file you send to a certificate authority (CA) to get a certificate. It holds your public key, the names the certificate is for, and a signature made with your private key. The signature proves that you have the private key. The private key itself stays on your server and is not in the CSR.

What is the CSR code?

The CSR code is the text of a CSR. It is Base64 between the -----BEGIN CERTIFICATE REQUEST----- line and the -----END CERTIFICATE REQUEST----- line. Java and Windows can write NEW CERTIFICATE REQUEST on these lines. It is the same CSR, and this tool reads it. The order form of a CA asks you to paste it. Copy all of it, with both lines. Paste it here first to see what the CA will read.

How do I read a CSR?

Paste the text from -----BEGIN CERTIFICATE REQUEST----- to -----END CERTIFICATE REQUEST----- in the editor, or drop the .csr file on it. The card shows the subject, each SAN, the key and the requested extensions. It also says if the signature is valid.

How do I decode a CSR with openssl?

Run openssl req -in request.csr -noout -text. To also check the signature, add -verify. The Text view here prints the same layout, and it does that for every CSR in the paste.

What should I check before I send a CSR to a CA?

Check these things:

  • Every host name is in the SAN list, also the one in the common name. Browsers read only the SANs.
  • The key is RSA 2048 bits or more, or an EC key such as P-256.
  • The signature uses SHA-256 or better, not SHA-1.
  • The organization and country are right, if you order an OV or EV certificate.
  • There is no challenge password. Most CAs do not use it.
Does a CSR contain my private key?

No. A CSR holds only the public key. The private key was made with the CSR and stays in its own file, often with a .key name. Keep that file. You need it to install the certificate. If you lose it, make a new key and a new CSR.

Is it safe to paste my CSR here?

Yes. The tool decodes in your browser, in JavaScript on this page. The certificate or CSR is never uploaded, stored or logged, and nothing is put in the URL. A certificate and a CSR are public data anyway: the server sends its certificate to every visitor. A private key is different. Never paste one into a website. If this tool finds a private key in the paste, it does not read it and tells you so.

Why does my CSR signature not match?

The CSR was changed after it was signed. A field may have been edited by hand, or the Base64 was damaged in copy and paste. A CA rejects such a CSR. Make a new one from the private key with openssl req -new -key example.key -subj "/CN=example.com" -addext "subjectAltName=DNS:example.com" -out example.csr.