Skip to content

micro509Typed PKI for modern TypeScript

The zero-dependency TypeScript PKI toolkit for real certificate workflows.

micro509micro509

See it run

Typed, runnable PKI in a few lines. Install it and mint a self-signed cert right here:

bash
npm install micro509
ts
import { createSelfSignedCertificate } from 'micro509';

const { certificate, keyPair } =
  await createSelfSignedCertificate({
    subject: { commonName: 'example.com' },
    validity: { days: 365 },
  });

console.log(certificate.pem);
console.log(
  `key type: ${keyPair.publicKey.algorithm.name}`,
);

Released under the MIT License.