OpenSSL Command Generator
Build copy-pasteable OpenSSL commands for keys, certificates and encryption without running them.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Built an OpenSSL command for the "rsa-key" task.
How it works
- Read the task and its file parameters.
- Validated every file name so no shell metacharacter can enter the command.
- Assembled the command with POSIX single-quote escaping.
- Returned the text; nothing was executed and no file was read.
- This tool only prints a command; it never executes it or reads a private key.
Methodology
- Map the selected task to the canonical OpenSSL sub-command and options.
- Validate every file name against a strict allow-list and reject anything that could alter the shell command.
- Quote each argument for a POSIX shell so the command is safe to paste.
- Attach a warning to operations that produce or transport private key material.
Usage
- Choose the task you want to perform.
- Fill in the file names and the task parameters (key size, subject, days, digest).
- Copy the generated command and run it in your own shell.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Generate a 4096-bit RSA private key
{
"task": "rsa-key",
"file": "private-key.pem",
"rsaBits": 4096
}Create a self-signed certificate
{
"task": "self-signed",
"file": "cert.pem",
"keyFile": "private-key.pem",
"subject": "/CN=example.com/O=Example",
"days": 365
}Create a certificate signing request
{
"task": "csr",
"file": "request.csr",
"keyFile": "private-key.pem",
"subject": "/CN=example.com/O=Example"
}SHA-256 digest of a file
{
"task": "digest",
"file": "archive.tar",
"digest": "sha256"
}Inspect a certificate
{
"task": "inspect-cert",
"file": "cert.pem"
}Limitations
A generator, not a runner
Keeping the tool as a pure command builder is both safer and more honest: you review the command before it runs, and the page never needs access to your filesystem or your keys. The file-name allow-list prevents the generator from emitting a command that could be abused by a crafted name.
Private-key hygiene
Generate keys with a strong algorithm and size, keep them out of version control, and never pass a passphrase on the command line. For transport, a password-protected PKCS#12 bundle is convenient but still carries the private key; protect the export password.
Frequently asked questions
- Does this run OpenSSL?
- No. It only assembles the command text. Nothing is executed, no file is read and no network request is made.
- Why does the tool refuse some file names?
- File names are restricted to letters, digits, dot, underscore, slash and hyphen so a name cannot inject a shell metacharacter into the command. If you need spaces, rename the file.
- How do I protect the private key?
- Use an encrypted key (`openssl genpkey` with a passphrase) and a PKCS#12 bundle for transport, and let OpenSSL prompt for the passphrase rather than passing it on the command line.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.