CSR Generator Online — Create & Verify Certificate Signing Requests (PKCS#10)

Certificates
100% client-side. Processed locally in your browser using the Web Crypto API. Nothing is sent to any server.

How It Works

Protect your private key — it is never transmitted. The key pair is generated with the Web Crypto API inside your browser and displayed once. Copy and save it immediately; if lost, the CSR is useless and you must generate a new pair. SANs are mandatory — modern browsers ignore the Common Name.

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

AlgorithmKey SizeSignature HashBest for
RSA2048 bitsSHA-256Legacy compatibility, older servers
RSA3072 bitsSHA-256Standard security margin (CA/B Forum minimum)
RSA4096 bitsSHA-256Maximum RSA security, larger TLS handshake
ECDSAP-256 (256 bits)SHA-256Modern default — small keys, fast signing
ECDSAP-384 (384 bits)SHA-384Higher 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

Missing Subject Alternative Names. Modern TLS clients (browsers, curl 7.x+) ignore the Common Name and read hostnames exclusively from the SAN extension. Always list every hostname the certificate must cover — including apex domain, www, and wildcards.
Not protecting the private key. The private key is generated in your browser and displayed once. If you lose it, the CSR is useless. Save it immediately in a secure location (encrypted file, secrets manager).
Using RSA 1024 or smaller. RSA keys below 2048 bits are considered insecure. The CA/Browser Forum requires a minimum of 2048 bits for web TLS certificates.
Not verifying the CSR before submission. Use the Inspect tab to cryptographically verify the CSR's signature and decoded fields before sending it to a CA. This catches encoding errors and subject mismatches early.
Confusing CSR with certificate. A CSR is a request — it is not a certificate. The CA signs the CSR to produce the certificate. The CSR contains your public key; the certificate contains the CA's signature over your public key and identity.

Security Notes

ECDSA is the modern default. P-256 offers equivalent security to RSA-3072 with much smaller keys and faster handshakes. All major CAs (Let's Encrypt, DigiCert, Cloudflare) support ECDSA CSRs.
Private key never leaves your browser. All key generation and CSR signing occurs locally using the Web Crypto API. No data is transmitted to any server.
SANs are mandatory for web TLS. List every hostname the certificate must cover. A certificate with names only in the CN is rejected by modern browsers.
Inspect mode verifies signatures. The Inspect tab re-parses the DER structure and cryptographically verifies the PKCS#10 signature — the same check a CA performs before issuing.

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

Related Concepts

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

Learn More