PT Privacy Tools

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 uploaded

Extensions
Key usage:
Extended key usage:

The key pair and certificate are created with Web Crypto in your browser. Nothing is uploaded.

Was this tool useful? Rate it:

Create 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

  1. Enter subject and SANsSet the Common Name and list every hostname or IP address the certificate must match.
  2. Choose optionsPick the key type, validity period, CA flag and key usages for your use case.
  3. Generate and saveDownload the certificate and private key PEM files and compare the SHA-256 fingerprint where you install them.

Frequently asked questions

Is the private key generated on a server?
No. The key pair and certificate are created with Web Crypto and @peculiar/x509 in your browser. Nothing is uploaded.
Why does my browser still show a warning?
A self-signed certificate is not issued by a trusted authority. Import it into your operating system or browser trust store, or use it only where you control the clients.
What does the CA option do?
It marks the certificate as a certificate authority (basicConstraints CA: true) and adds keyCertSign and cRLSign, so it can sign other certificates for a private test PKI.
Can I use this certificate in production?
Only for internal services where you distribute trust yourself. Public websites should use a certificate from a trusted CA such as Let's Encrypt.