SSL Toolkit Logo

OpenSSL Command Generator

Build correct openssl commands for keys, certificates, conversion and verification

Leave blank for the recommended default.

Comma or space separated.

Optional — leave blank to get a placeholder.

About the OpenSSL Command Generator

OpenSSL has hundreds of subcommands and flags, and a single wrong argument can produce a key that no server will load or a certificate chain that browsers reject. This generator turns a plain-language task into the exact command you need - key generation, certificate signing requests, self-signed certificates, PEM/ DER/ PKCS#12 conversion, chain verification, OCSP queries and TLS protocol testing - with the flags that are easy to forget, such as -noout, -addext and -servername.

How to Use

  1. Pick the task you want to perform from the dropdown.
  2. Fill in only the fields that appear - the form shows just the inputs the chosen task needs.
  3. Click Generate command to get the full command plus any follow-up verification steps.
  4. Copy the command and paste it into a terminal on the machine that holds the files.

Use Cases

  • Renewals: regenerate a CSR and key with the same SANs when a certificate expires.
  • Migration: convert between PEM, DER, PKCS#7 and PKCS#12 when moving between nginx, IIS, Java and Windows.
  • Troubleshooting: inspect what a server actually sends and verify the chain end-to-end.
  • Documentation: produce the exact commands for a runbook or an internal wiki page.

Frequently Asked Questions

The commands are standard OpenSSL invocations. Read them before running them, adjust the file names to match your environment, and remember that the generated commands assume a Linux/macOS shell. The tool never touches your files - it only prints text.
Modern browsers and CAs ignore the Common Name and only look at the Subject Alternative Name extension. Without an explicit SAN, a certificate is treated as invalid by current clients even if the CN matches.
PKCS#12 (.p12/.pfx) can hold a private key together with certificates and is password-protected - use it for IIS, Windows and Java keystore imports. PKCS#7 (.p7b) holds certificates only, with no key, and is often used for CA bundle downloads.
Because the useful ones operate on your private keys, and a website should not need to handle those. Generating the command and running it yourself keeps key material on your machine, which is the only place it belongs. For the same reason the commands that read a key are marked rather than presented as routine.
Not misreading the documentation — omitting a required argument, particularly a digest or an encoding. Requesting a CSR without specifying the hash silently defaults to something older than intended, and the result is a certificate signed with a weaker algorithm than you expected. When a result surprises you, the digest is the first thing to check.
Because it is the parameter that determines whether the output is usable for the next decade or not. RSA at 2048 bits is the accepted floor and 4096 gives margin at a cost in handshake size; elliptic curves give comparable strength far smaller. Choosing a key type and size once, deliberately, is worth more than optimising anything else in your certificate setup.
Yes, and it is worth knowing because it works offline on a file you hold, which no external checker can do. Connecting with no server name and printing the notAfter field gives the date directly. That is the reliable way to verify a certificate before deploying it, and the way to check a file recovered from backup without sending it anywhere.
Anything that writes or overwrites without asking, and anything reading a private key. The distinction matters because an output file being replaced by the next run of the same command is an easy mistake to make and a confusing one to diagnose later. Run in a deliberate directory and read the command before pressing enter — particularly if you are adapting one you generated here.

Tips & Best Practices

  • •Keep private keys at chmod 600 and never commit them to version control.
  • •Always verify a CSR and confirm the private key matches before deploying.
  • •Use TLS 1.2 as the minimum and enable TLS 1.3 where clients support it.
  • •Add -servername whenever a host serves multiple certificates.

Technical Details

Tasks: key generation, CSRs, self-signed certificates, inspection, fingerprinting, chain verification, OCSP, protocol testing, format conversion.
Algorithms: RSA, ECDSA (P-256/P-384/P-521), Ed25519, Ed448.
Formats: PEM, DER, PKCS#7, PKCS#8, PKCS#12.
Safety: all inputs are validated and shell-quoted; nothing is executed server-side.