explaingit

filosottile/mkcert

58,931GoAudience · developerComplexity · 2/5StaleLicenseSetup · easy

TLDR

A command-line tool that generates HTTPS certificates your browser trusts on your local machine, eliminating security warnings during web development.

Mindmap

mindmap
  root((mkcert))
    What it does
      Creates local certificates
      Registers trusted authority
      Eliminates browser warnings
    How to use
      Two-command setup
      Specify domain names
      Generate certificate files
    Supported features
      Multiple domains
      Wildcard domains
      Localhost and IPs
    Platforms
      macOS
      Linux
      Windows
    Use cases
      Test HTTPS features
      Secure cookies locally
      Mixed-content testing

Things people build with this

USE CASE 1

Test HTTPS-required browser features and secure cookies on your local development machine without certificate errors.

USE CASE 2

Generate trusted certificates for localhost and custom development domains to test mixed-content restrictions.

USE CASE 3

Create wildcard certificates covering multiple subdomains in a single file for local testing environments.

USE CASE 4

Set up a local certificate authority once and reuse it to generate certificates for any number of development projects.

Tech stack

Go

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

mkcert is a small command-line tool that generates HTTPS certificates that your browser will trust on your local development computer. The problem it solves is a common frustration for web developers: when you run a website on your own machine for testing, your browser displays scary security warnings because the site uses HTTPS but there is no trusted certificate authority vouching for it. Using real certificates from official certificate authorities is not possible for local addresses like localhost or made-up development domains, and self-signed certificates cause browsers to complain. mkcert eliminates this friction entirely. The way it works is that it creates a local certificate authority on your machine, which acts as a private trusted root for your computer only. It then registers that authority with your operating system's trust store, and optionally with Firefox and the Java runtime. Once that is done, you run mkcert with the domain names you want and it generates certificate files that your browser accepts without warnings, because your local certificate authority signed them. The whole setup takes two commands. The tool supports macOS, Linux, and Windows, and can generate certificates for multiple domains, wildcard domains like star.example.com, localhost, and IP addresses in a single certificate file. It is written in Go, which means it compiles to a single self-contained binary. An important caveat noted in the README is that the private key file mkcert generates should never be shared, as it would allow anyone who has it to create fake trusted certificates on your machine. You would use mkcert whenever you need to test HTTPS-required browser features, secure cookies, or mixed-content restrictions locally without fighting certificate errors.

Copy-paste prompts

Prompt 1
How do I use mkcert to generate a local HTTPS certificate for localhost and my development domain?
Prompt 2
Show me the steps to install mkcert and set up a trusted certificate authority on my machine.
Prompt 3
How do I generate a wildcard certificate with mkcert that covers multiple subdomains at once?
Prompt 4
What's the safest way to manage the private key file that mkcert generates for my local certificates?
Prompt 5
How do I configure my local web server to use the certificates mkcert creates?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.