Originally published on cert-depot.com . Free, open-source self-signed certificate generator — no signup, keys never stored.
Self-Signed Certificates for localhost Development
Stop clicking past browser warnings. Get a proper green-padlock HTTPS localhost in a few minutes.
Most modern web APIs require HTTPS: Service Workers, Web Crypto, geolocation, camera access, OAuth flows, HTTP/2. Developing locally against HTTP hits constant "feature unavailable" errors. A self-signed cert for localhost fixes this — but only if you trust it properly.
Step 1: Generate the certificate
With cert-depot.com : enter localhost as the Common Name, add 127.0.0.1 and ::1 as IP SANs, generate.
With OpenSSL:
openssl req -x509 -newkey rsa:2048 -nodes \ -keyout localhost.key -out localhost.crt \ -days 365 \ -subj "/CN=localhost" \ -addext "subjectAltName=DNS:localhost,IP:127.0.0.1,IP:::1"
Enter fullscreen mode
Exit fullscreen mode
Step 2: Trust it in your OS
This is the step that makes the browser warning go away.…