How to use the csr decoder
- Create a CSR with
openssl req -new -key server.key -out server.csror your server software, then open the .csr file in a text editor. - Copy everything from
-----BEGIN CERTIFICATE REQUEST-----to-----END CERTIFICATE REQUEST-----and paste it into the box. - Check that the common name and the Subject Alternative Names list every hostname you want on the certificate.
- Check the key size and signature algorithm, then submit the CSR to your CA.
What a PKCS#10 request contains
A certificate signing request is defined in PKCS#10 (RFC 2986). It has three parts: the request information, a signature algorithm identifier and a signature made with the private key that matches the public key inside the request. The signature proves you hold that key without revealing it.
| Part | Contents |
|---|---|
| Version | Always 1 in practice (stored as 0) |
| Subject | The distinguished name: C, ST, L, O, OU, CN |
| Public key | SubjectPublicKeyInfo with the algorithm and the key |
| Attributes | Optional extras, most often the requested extensions |
Where the Subject Alternative Names are stored
SANs are not part of the subject. They sit in an attribute called extensionRequest (OID 1.2.840.113549.1.9.14), which wraps a normal X.509 extensions list. This csr decoder opens that attribute and prints the subjectAltName entries as DNS names, IP addresses, emails and URIs.
If the row says no extensionRequest attribute, the request names a host only in its common name. Most public CAs ignore the CN for validation and ask for a SAN list, and browsers match hostnames against SANs, so regenerate the request with a SAN section. With OpenSSL 1.1.1 or later you can add -addext "subjectAltName=DNS:example.com,DNS:www.example.com" to the openssl req command.
Worked example: a request for shop.acme.example
The default example is a request from Acme Ltd. The decoder returns the subject C=GB, ST=London, L=London, O=Acme Ltd, OU=Web, CN=shop.acme.example and the common name shop.acme.example. It lists four SANs: DNS:shop.acme.example, DNS:www.acme.example, IP Address:198.51.100.7, email:ops@acme.example. The key is RSA with 2048 bits (exponent 65537), signed with sha256WithRSAEncryption.
The second example is an EC P-256 request with no extensions at all. It decodes to a subject and a key but shows that no SAN was requested, which is the usual reason a CA asks you to resubmit.
Checking a CSR before you submit it
Reviewing the request takes seconds and avoids a reissue. Check these points:
- Names: every hostname must appear as a DNS SAN. A wildcard such as
*.example.comcovers one label only. - Key size: RSA 2048 is the usual minimum. Weaker keys are refused by public CAs.
- Signature algorithm:
sha256WithRSAEncryptionor an ECDSA with SHA-256 or SHA-384 is fine. MD5 and SHA-1 signatures are flagged as a warning row. - Key type: check that your CA and server software accept the EC curve you chose. P-256 and P-384 are widely supported.
To confirm the signature itself, run openssl req -in server.csr -noout -verify. This page reads the structure but does not recompute the signature.
Mistakes that cause rejected requests
The most common one is pasting the wrong file. A private key block starts with BEGIN PRIVATE KEY and must never be shared, and a CSR never contains one. If the box shows an error about the label, check that the block says CERTIFICATE REQUEST. Some tools write NEW CERTIFICATE REQUEST, which is also accepted.
Other frequent errors are a CSR created for the wrong domain, a country code of more than two letters, and a binary .der request that needs converting. For binary files use the certificate converter. Once the CA returns the signed certificate, inspect it with the SSL certificate decoder and track its renewal date with the expiry checker.
Worked examples
| Example | Input | Result |
|---|---|---|
| RSA 2048 CSR with SANs | PEM certificate request: -----BEGIN CERTIFICATE REQUEST----- / MIIDCjCCAfICAQAwbDELMAkGA1UEBhMCR0IxDzANBgNVBAgMBkxvbmRvbjEPMA0G / A1UEBwwGTG9uZG9uMREwDwYDVQQKDAhBY21lIEx0ZDEMMAoGA1UECwwDV2ViMRow / GAYDVQQDDBFzaG9wLmFjbWUuZXhhbXBsZTCCASIwDQYJKoZIhvcNAQEBBQADggEP / ADCCAQoCggEBAI38Rpnw+4mpTHWJgAi/sVrAJU0RYwwHF//YbMoTg0/nS+VNkVNF / nLDCUzFVWwXpbtTwBj9rZSXtZ7LNxKU+w1bxLXdu8BdtwUlEOWXF1B786cGDZV6k / 3GDkqdRNSWbl6vS29RRCW6DAV79Ezz02Z6kGoveW/lFgBZ2Y044w8w3mL1oRCzgA / Ikuo/joV3BbNhFXatPMBmtxCGo8QH5JVMoTivm7K2LwwrclZaL1kkzH+QddlVvfc / +foEOtnmlrQnoJIQdZ8X5tkELQwyqQ15PpYapomAXRLsHGDOWobirBy8ImeswXAP / 5FvobKCLlamvHH6RgvZY3mp2W4JjPd1VvQUCAwEAAaBZMFcGCSqGSIb3DQEJDjFK / MEgwRgYDVR0RBD8wPYIRc2hvcC5hY21lLmV4YW1wbGWCEHd3dy5hY21lLmV4YW1w / bGWHBMYzZAeBEG9wc0BhY21lLmV4YW1wbGUwDQYJKoZIhvcNAQELBQADggEBAGqi / xwMjsgiUeRbQZyIm0YlLhx2sNJ/rTT26sgJoSmtN3xWqmxUYx5hyldLaTrd2xgtK / 2KPiH7sjc3pVqtMhKPwUXhCcNE7on+0Kom0A/bpoZzqvnsJ/sOhcPCTCvHRdUOq5 / X73KNmcb76HrMV3zdFMQyUOVL1tEqnKUY6vvUccU/xqTamDjdzbgbRhu9y6rIgz+ / /NGNUBgjd2KAHL1qVQhIiIHTU0kQiRYMWYF5YjTGBPf1SdfIe/z6uqw/SmyHOjHK / Pew96Xc/xhTtcTUQy7yQBaWzGypfZhTHAS7G8R3HdTyujFV0aeHhvvqwRjsMxrWb / fpsWEBB0hA++WitPNw0= / -----END CERTIFICATE REQUEST----- | Subject: C=GB, ST=London, L=London, O=Acme Ltd, OU=Web, CN=shop.acme.example; Common name: shop.acme.example; Subject Alternative Names: DNS:shop.acme.example, DNS:www.acme.example, IP Address:198.51.100.7, email:ops@acme.example; Public key algorithm: RSA; Public key size: 2048 bits (exponent 65537); Signature algorithm: sha256WithRSAEncryption; Version: 1 |
| EC P-256 CSR without SANs | PEM certificate request: -----BEGIN CERTIFICATE REQUEST----- / MIH/MIGmAgEAMEQxCzAJBgNVBAYTAkRFMRYwFAYDVQQKDA1CZWlzcGllbCBHbWJI / MR0wGwYDVQQDDBRhcGkuYmVpc3BpZWwuZXhhbXBsZTBZMBMGByqGSM49AgEGCCqG / SM49AwEHA0IABFBVDf7Yau8gUVF4/BAALDZXbvx5SfNi7gnVtmZDYX+xBjMfol5A / ek5zysrXCVzc3YM8f4yQh9IZb/S+MTMP7DugADAKBggqhkjOPQQDAgNIADBFAiEA / hEVDACKDrzfItABemQ1Jdkrd+OJ2OD0BbMGKQUywsqsCIBfrZoF7lyhyIrLl0a0P / kZxp1kPN0C5BJzOIS9vDdSRi / -----END CERTIFICATE REQUEST----- | Subject: C=DE, O=Beispiel GmbH, CN=api.beispiel.example; Common name: api.beispiel.example; Subject Alternative Names: None (no extensionRequest attribute); Public key algorithm: EC; Public key size: prime256v1 (P-256), 256 bits; Signature algorithm: ecdsa-with-SHA256; Version: 1 |
| EC P-384 CSR | PEM certificate request: -----BEGIN CERTIFICATE REQUEST----- / MIIBQjCByAIBADAbMRkwFwYDVQQDDBBwMzg0LmNzci5leGFtcGxlMHYwEAYHKoZI / zj0CAQYFK4EEACIDYgAEzuuWL3WF63DmSsXirhX33WX5NlFej3P/nBBXhlWJ8h5h / 5kRatWOtXLiXwyneLjzJGYxvj9kMd8FqN8/rDeMPzda3SmmoMChQQSAjAvnNAx/a / D069yD+tmqZe5v3ns+L6oC4wLAYJKoZIhvcNAQkOMR8wHTAbBgNVHREEFDASghBw / Mzg0LmNzci5leGFtcGxlMAoGCCqGSM49BAMDA2kAMGYCMQD8Sk551etdCKod1PAa / vbkcdgUk8g7kS7sV6hjjEFJDmGhXqMZ5oxF2WKFY1qoqSBECMQCkVW8hm+L7XbYQ / 8hyIT2hJtzmPeKOjY7Oj3fPrzTc2MjjtBdYgMns8v10tsILal5E= / -----END CERTIFICATE REQUEST----- | Subject: CN=p384.csr.example; Common name: p384.csr.example; Subject Alternative Names: DNS:p384.csr.example; Public key algorithm: EC; Public key size: secp384r1 (P-384), 384 bits; Signature algorithm: ecdsa-with-SHA384; Version: 1 |
FAQ
What is a CSR?
A certificate signing request is a PKCS#10 message with your public key and identity details, signed with your private key. You send it to a certificate authority, which returns a signed certificate.
Does a CSR contain my private key?
No. It holds the public key and a signature made with the private key. The private key stays on your server.
Why does the decoder show no Subject Alternative Names?
The request was created without a subjectAltName extension. Regenerate it with the hostnames listed as SANs, since current browsers ignore the common name.
Can I paste a DER-encoded CSR?
The box reads PEM text. Convert a binary request with the certificate converter or with openssl req -inform der -in req.der -out req.pem.
Which key types does the decoder understand?
RSA keys of any size, EC keys on common named curves (P-256, P-384, P-521, secp256k1, Brainpool), Ed25519 and Ed448.
Does the decoder check the CSR signature?
No, it reads the structure only. Use openssl req -noout -verify -in file.csr to check that the signature matches the embedded public key.