TOTP Code Generator Online — Free & Private API

A free edge API by formatho.com, privacy-first developer tools.

Open the full browser tool →

Free, no signup, runs entirely in your browser — your data never leaves your device.

🔓 Free🔒 Zero tracking🚫 No data collection⚡ Edge-fast

Usage

curl "https://totp-generator-formatho.filesformatho.workers.dev/api?secret=JBSWY3DPEHPK3PXP"

Optional parameters: algorithm (sha1 | sha256 | sha512, default sha1), digits (6–8, default 6), period (seconds, default 30), time (unix seconds, default now), or a direct HOTP counter. You can also pass a full otpauth:// URL via ?url=otpauth%3A%2F%2Ftotp%2F… — type, label, issuer and parameters are parsed automatically.

The response includes the current code plus previous/next window codes and seconds until the code rotates — handy for testing 2FA flows. The secret is never echoed back.

Full parameter reference: /api endpoint.

Privacy-first: codes are computed in-memory at the edge; your secret is never logged or stored.

Full browser tool

Generate codes entirely client-side: OTP Code Generator on formatho.com.

All Formatho edge APIs

Browse every free Formatho Worker tool on the Formatho Tools index.