# TOTP authenticator

> Live 2FA codes for your accounts, with otpauth:// import and QR export.

Free TOTP and HOTP authenticator. Add accounts with a base32 secret, watch live codes tick down with a countdown, copy with one click, and import or export otpauth:// provisioning URIs. Everything runs in the browser; secrets never leave the page.

- Page: https://benchline.fabwaseem.com/t/totp-generator
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: Account label, base32 secret, digits (6/8), period, algorithm, TOTP/HOTP mode, or otpauth:// URIs to import.
- Output: Live one-time codes with countdown, provisioning QR codes, and exportable otpauth:// URIs.
- Keywords: totp generator, 2fa authenticator, hotp code, otpauth uri, authenticator app
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Add an account.** Enter the label, the base32 secret, and the digits, period, and algorithm. Or paste an otpauth:// URI into the import box.
2. **Read the live code.** Codes refresh every period. The bar shows how long the current code stays valid.
3. **Back up.** Use Export to download your accounts as otpauth:// URIs before clearing site data.

## Use it from an AI agent

MCP tool name: `generate_totp`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/totp-generator with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Compute RFC 4226/6238 one-time passcodes from a base32 secret. Supports 6/8 digits, SHA1/SHA256/SHA512, and custom periods.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "secret": {
      "type": "string",
      "minLength": 1,
      "description": "Base32 TOTP/HOTP secret"
    },
    "mode": {
      "default": "totp",
      "type": "string",
      "enum": [
        "totp",
        "hotp"
      ]
    },
    "digits": {
      "default": 6,
      "anyOf": [
        {
          "type": "number",
          "const": 6
        },
        {
          "type": "number",
          "const": 8
        }
      ]
    },
    "period": {
      "default": 30,
      "description": "TOTP period in seconds",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "algorithm": {
      "default": "SHA1",
      "type": "string",
      "enum": [
        "SHA1",
        "SHA256",
        "SHA512"
      ]
    },
    "at": {
      "description": "Unix time in milliseconds; defaults to now",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "counter": {
      "default": 0,
      "description": "HOTP counter",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "secret",
    "mode",
    "digits",
    "period",
    "algorithm",
    "counter"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_totp",
    "arguments": {
      "secret": "example",
      "mode": "totp",
      "digits": 6,
      "period": 30,
      "algorithm": "SHA1",
      "counter": 0
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Where are my secrets stored?

In your browser's localStorage, on this device only. Nothing is sent to a server. Clearing site data removes them, so keep a backup of your otpauth:// URIs.

### Which algorithms and settings are supported?

TOTP and HOTP with 6 or 8 digits, periods of 15, 30, or 60 seconds, and SHA1, SHA256, or SHA512. Defaults match Google Authenticator: 6 digits, 30 seconds, SHA1.

### How do I move an account from another authenticator?

Export shows each account as an otpauth:// URI. Many apps let you view the QR code or URI for an account; paste it into the import box here.

### Why is my code rejected?

TOTP codes depend on the clock. Make sure your device time is correct and automatic. Also check the digits, period, and algorithm match the service.

## Related tools

- [Password generator](https://benchline.fabwaseem.com/t/password-generator): Cryptographic passwords and passphrases, with an entropy strength meter.
- [Hash generator](https://benchline.fabwaseem.com/t/hash-generator): MD5, SHA-1, SHA-256, and SHA-512 checksums for text or a file, with HMAC.
- [JWT decoder](https://benchline.fabwaseem.com/t/jwt-decoder): Paste a JSON Web Token, read the claims, and verify the signature in the browser.
- [QR code generator](https://benchline.fabwaseem.com/t/qr-code-generator): Make a static QR code for text, a URL, Wi-Fi, or a vCard. Set the colors and error correction, then download SVG or PNG.
