Self-Signed Certificate Generator
Generate a self-signed X.509 certificate and private key with SANs, validity, CA flag and key usages. Shows SHA-256 fingerprint. Runs locally.
π Runs entirely in your browser β nothing is uploadedCreate a self-signed certificate in seconds
A self-signed certificate is an X.509 certificate signed with its own private key instead of by a
certificate authority. It is ideal for local HTTPS development, internal dashboards, test environments,
IoT devices and lab networks. This generator creates the key pair with your browser's Web Crypto API,
builds the certificate with @peculiar/x509 and outputs both as PEM files, the same format
produced by openssl req -x509. It also decodes the result for you, showing the subject, serial
number, validity dates, extensions and the SHA-256 fingerprint, so you can verify exactly what you created.
Nothing is sent to a server.
Choosing the right options
Browsers match hostnames only against Subject Alternative Names, so add every name you will type in the
address bar, for example localhost, 127.0.0.1 and ::1. ECDSA P-256 keys are
small and fast and work in all modern software; choose RSA 2048 or 4096 if an older system requires it.
Keep validity short for development certificates, since many clients reject leaf certificates valid for
more than about 398 days. Leave the CA option off for a server certificate. Turn it on only when you want a
private root that signs other certificates; it adds the keyCertSign and cRLSign key usages automatically.
Trust and security tips
Because no public authority vouches for it, browsers will show a warning until you import the certificate into the operating system or browser trust store. Only trust certificates you generated yourself, and compare the SHA-256 fingerprint when installing it on another machine. The private key is unencrypted PEM: store it with restrictive file permissions, never commit it to source control, and create a new key pair rather than reusing one across projects. For public websites, use a certificate from a trusted CA such as Let's Encrypt instead.
How to use
- Enter subject and SANsSet the Common Name and list every hostname or IP address the certificate must match.
- Choose optionsPick the key type, validity period, CA flag and key usages for your use case.
- Generate and saveDownload the certificate and private key PEM files and compare the SHA-256 fingerprint where you install them.