CSR Generator Online — Create & Verify Certificate Signing Requests (PKCS#10)
Certificates How It Works
What Is a CSR?
A Certificate Signing Request (CSR) is a standardized message (defined by PKCS#10, RFC 2986) sent to a Certificate Authority (CA) to request a digital certificate. It contains the applicant's public key and identity information (Common Name, Organization, Country, Subject Alternative Names). The CSR is signed with the applicant's private key, proving possession of the key pair. The CA never sees the private key.
When to Use a CSR
- TLS/SSL certificate issuance — request certificates from Let's Encrypt, DigiCert, Cloudflare, or any CA
- Internal PKI — generate CSRs for enterprise certificate authorities to issue internal certificates
- Multi-domain certificates — include Subject Alternative Names (SANs) to cover multiple hostnames in one certificate
- Key reuse — import an existing PKCS#8 private key to generate a new CSR without creating a new key pair
- CSR verification — use the Inspect mode to cryptographically verify any CSR's signature before submitting to a CA
Key Algorithm Comparison
| Algorithm | Key Size | Signature Hash | Best for |
|---|---|---|---|
| RSA | 2048 bits | SHA-256 | Legacy compatibility, older servers |
| RSA | 3072 bits | SHA-256 | Standard security margin (CA/B Forum minimum) |
| RSA | 4096 bits | SHA-256 | Maximum RSA security, larger TLS handshake |
| ECDSA | P-256 (256 bits) | SHA-256 | Modern default — small keys, fast signing |
| ECDSA | P-384 (384 bits) | SHA-384 | Higher security margin, government/compliance |
Standards Compliance
- RFC 2986 — PKCS #10: Certification Request Syntax
- RFC 5280 — Internet X.509 Public Key Infrastructure Certificate and CRL Profile
- CA/Browser Forum Baseline Requirements — minimum key sizes and SAN requirements for web TLS
- Web Crypto API — W3C standard for browser-native key generation and signing
Last updated:
Code Examples
OpenSSL — RSA CSR with SAN
# Generate CSR with OpenSSL (RSA 2048 + SAN)
openssl req -new -newkey rsa:2048 -nodes \
-keyout server.key -out server.csr \
-subj "/CN=example.com/O=MyOrg/C=US" \
-addext "subjectAltName=DNS:example.com,DNS:www.example.com"
# Verify the CSR signature
openssl req -in server.csr -noout -verify OpenSSL — ECDSA CSR
# Generate CSR with OpenSSL (ECDSA P-256)
openssl ecparam -genkey -name prime256v1 -out ec.key
openssl req -new -key ec.key -out server.csr \
-subj "/CN=example.com/O=MyOrg/C=US" \
-addext "subjectAltName=DNS:example.com,IP:192.168.1.1"
# Decode and inspect CSR fields
openssl req -in server.csr -noout -text Python
from cryptography import x509
from cryptography.x509.oid import NameOID
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import ec
# Generate ECDSA key
key = ec.generate_private_key(ec.SECP256R1())
# Build CSR
csr = x509.CertificateSigningRequestBuilder().subject_name(
x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, "example.com")])
).add_extension(
x509.SubjectAlternativeName([
x509.DNSName("example.com"),
x509.DNSName("www.example.com"),
]),
critical=False,
).sign(key, hashes.SHA256())
print(csr.public_bytes(serialization.Encoding.PEM).decode()) Go
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
)
func main() {
key, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
template := x509.CreateCertificateRequest{
Subject: pkix.Name{CommonName: "example.com"},
DNSNames: []string{"example.com", "www.example.com"},
}
csrBytes, _ := x509.CreateCertificateRequest(rand.Reader, &template, key)
pem.Encode(os.Stdout, &pem.Block{Type: "CERTIFICATE REQUEST", Bytes: csrBytes})
} Node.js
const { execSync } = require('child_process');
// Generate CSR using Node.js crypto module
const crypto = require('crypto');
const { privateKey, publicKey } = crypto.generateKeyPairSync('ec', {
namedCurve: 'P-256'
});
// Note: Node.js does not have a built-in CSR API.
// Use the 'node-forge' library or call OpenSSL via child_process.
console.log('Use node-forge or openssl CLI for CSR generation'); Common Pitfalls
Security Notes
Disclaimer
This tool is provided for educational and development purposes. CSR generation follows PKCS#10 (RFC 2986) and X.509 (RFC 5280) standards. For production TLS deployments, always follow CA/Browser Forum Baseline Requirements and consult a security professional. All computation occurs entirely in your browser.
Further Reading
- RFC 2986 — PKCS #10: Certification Request Syntax
- RFC 5280 — Internet X.509 Public Key Infrastructure
- CA/Browser Forum Baseline Requirements
- Wikipedia — Certificate Signing Request
Related Concepts
- How TLS Works — The Role of Certificates
- Certificate Signing Requests — Complete Guide
- PEM Format Converter — PKCS#1 vs PKCS#8
- CSR Generator
Related Tools
Need to convert the generated key between PKCS#1 and PKCS#8 formats? Use the PEM Format Converter. To decode and inspect an issued certificate, try the PEM Certificate Parser. For generating standalone RSA key pairs before creating a CSR, see the RSA Key Generator.
Frequently Asked Questions
What is a CSR and when do I need one?
A Certificate Signing Request (PKCS#10, RFC 2986) is the standard way to ask a Certificate Authority (like Let's Encrypt or DigiCert) to issue a TLS certificate. You generate a key pair, put the public key plus your identity (Common Name, organization, SANs) into the CSR, sign it with the private key, and send the CSR to the CA. The CA never sees your private key.
Which key algorithm should I choose?
ECDSA P-256 is the modern default: small keys, fast signing, and supported by every major CA and browser. RSA 2048 remains the safest compatibility choice for legacy systems; RSA 3072/4096 offer more security margin at the cost of larger handshakes. All presets map to a SHA-256 (or SHA-384 for P-384) signature algorithm.
Why do I need Subject Alternative Names (SAN)?
Modern TLS clients ignore the Common Name and read hostnames exclusively from the SAN extension — a certificate with names only in the CN is rejected by browsers. List every hostname the certificate must cover (including the apex domain, www, and wildcards like *.example.com); IPv4 addresses are encoded as iPAddress entries.
What happens to the private key this tool generates?
It is created with the Web Crypto API inside your browser, displayed once, and never stored, logged, or transmitted. Copy and save it immediately — if you lose it, the CSR is useless and you must generate a new pair. You can also skip generation entirely and paste an existing PKCS#8 key to reuse it.
How does the signature verification in the Inspect mode work?
The inspector re-parses the DER structure, re-imports the embedded SubjectPublicKeyInfo, and verifies the PKCS#10 signature over the CertificationRequestInfo bytes using Web Crypto — the same check a CA performs before issuing. It also decodes the subject, requested SANs, algorithms, and the CSR's SHA-256 fingerprint.
Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.
More in Certificates
PEM Format Converter
Convert RSA keys between PKCS#1 and PKCS#8 formats online. Analyze X.509 certificates, export DER hex, detect key type and algorithm.
PEM Certificate Parser
Parse and decode PEM certificates and keys online. View X.509 details: issuer, subject, validity, signature algorithm, fingerprints.