OpenSSL Command Builder

Pick what you want to do, fill in names and options, and copy an openssl command where every flag is explained and weak choices such as SHA-1 or 1024-bit keys are flagged.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Choose your setup

    Select the OpenSSL version and whether you use bash or PowerShell.

  2. 2
    Pick an operation

    Load a recipe or add steps such as a key, a CSR and a signature.

  3. 3
    Fill the form

    Enter names, SANs, key type, validity and file names.

  4. 4
    Read the warnings

    Fix anything marked weak and read the flag explanations.

  5. 5
    Export the script

    Copy the command or download the whole recipe as a .sh or .ps1 file.

  6. 6
    Inspect the result

    Paste the new certificate into the inspector to check its names and dates.

About this tool

OpenSSL can do almost anything with keys and certificates, but its commands are long and the flags differ between versions and subcommands. This builder writes them for you. Choose an operation from the list: generate an RSA, EC, Ed25519 or Ed448 private key, extract the public key, create a certificate signing request with a subject and subject alternative names, make a self-signed certificate, create a private root CA, sign a CSR with that CA, convert PEM files into a PFX bundle or split a PFX back into key, certificate and chain, convert between PEM and DER, inspect a certificate, CSR, key or PFX, verify a chain, check that a key matches its certificate, test a live TLS server with s_client, hash or HMAC a file, sign and verify a file, encrypt a file with a password, print random bytes and generate DH parameters. Every operation has a form with sensible defaults, and the command appears as you type. Below it, a table explains each part of the command in plain words. The builder knows the differences between OpenSSL 3 and 1.1.1, for example -noenc instead of -nodes, -legacy for old PFX files and -copy_extensions on x509, and it can quote arguments for bash or PowerShell. Steps can be chained into a recipe and saved as a script.

Warnings for weak or risky choices

Each command is checked as it is built. RSA keys under 2048 bits, SHA-1 or MD5 signatures, 3DES or RC4 encryption, Diffie-Hellman groups under 2048 bits and TLS 1.0 or 1.1 tests are marked as weak. The builder also warns about practical traps: a CSR without subject alternative names, which every modern browser rejects; certificates valid for more than 825 days, which Apple devices refuse; certificates over 398 days for public TLS; an unencrypted CA key; a password passed with pass:, which lands in shell history; a PFX without the intermediate chain; and openssl enc without -pbkdf2, which derives the key with a single hash. Informational notes explain choices such as when to use -legacy, why copy_extensions trusts the CSR and how -checkend can drive an expiry alert.

Recipes, config files and the PEM inspector

Five ready-made recipes chain the right steps: a CSR for a public CA, a local development CA with an HTTPS certificate for app.test, converting a Windows PFX for nginx, checking a live server certificate, and encrypting a backup. The whole recipe can be downloaded as a bash or PowerShell script with a comment above each step. For CSRs, a config-file option writes an openssl.cnf with a DN section and an alt_names list, which works on every OpenSSL version. The inspector tab reads pasted PEM blocks, names their type (PKCS#8, PKCS#1, SEC1, CSR, PKCS#7, CRL) and decodes certificates with its own DER reader: subject, issuer, validity, days left, SANs, key type, signature algorithm and whether it is a CA.

Worked example

Load the recipe Local dev CA and HTTPS certificate with OpenSSL 3 and bash. It has 5 steps and the script is 21 lines long. Step 1 creates a P-384 root CA valid for 3650 days with basicConstraints CA:TRUE and pathlen 0, and warns that the CA key is not encrypted. Step 2 generates a P-256 key for app.test. Step 3 writes the CSR with subjectAltName DNS:app.test, DNS:*.app.test, DNS:localhost and IP:127.0.0.1. Step 4 signs it for 397 days with -copy_extensions copyall, so the SANs are kept, and step 5 verifies the result with -purpose sslserver -verify_hostname app.test. We ran this script with OpenSSL 3.6 and the last line printed app.test.crt: OK. The inspector's sample certificate decodes as CN=shobfree.test with an EC P-256 key, three SANs and an expiry of 9 December 2027.

Limits

The builder does not run OpenSSL and cannot see your files, so it cannot tell whether a path exists or a password is right. Options are checked against OpenSSL 3 and 1.1.1; LibreSSL, BoringSSL and the macOS system openssl may not support every flag. It is not a substitute for your certificate authority's own requirements.

Worked example

Local dev CA recipe: 5 steps, a 21-line script; the CA uses P-384 for 3650 days, app.test is signed for 397 days with 4 SANs and verifies OK.

Quick facts

Frequently asked questions

Which key type should I choose?

EC P-256 is fast, small and accepted everywhere for TLS. RSA 3072 is the safe choice when an old client only supports RSA. Ed25519 suits signing and SSH but is not yet accepted for public web certificates.

Why do browsers reject my self-signed certificate?

First, it has to be trusted on that device. Second, it needs a subjectAltName with the host name, because browsers ignore the CN. A private CA that signs each site is easier to manage than many self-signed certificates.

What does -legacy do with PKCS#12 files?

OpenSSL 3 writes and reads PFX files with AES and PBKDF2 by default. Older Windows and Java versions only understand RC2 or 3DES, and old PFX files need -legacy to be opened by OpenSSL 3.

How do I check that a key matches a certificate?

Use the match operation. It hashes the public key extracted from the private key, the certificate and the CSR; if all three hashes are equal, they belong together. This works for RSA and EC keys.

Is it safe to paste a certificate into the inspector?

Yes. Certificates are public, and the decoding happens in this page. Avoid pasting private keys anywhere; the inspector names their type without needing their contents.

Does the page run OpenSSL or upload anything?

No. It only writes the commands. You run them yourself in a terminal, and your files never leave your computer.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages