Skip to content
All tools

2FA Code Generator (TOTP)

Paste 2FA secrets (one or many lines, also account|pass|SECRET and otpauth://) to get 6-digit codes that refresh every 30 seconds. Computed in your browser — secrets never leave your device. Free, with API.

·Developer API ↓

Accepts base32 (spaces and lowercase are fine), account|password|SECRET and otpauth://. Reloading clears everything — nothing is saved.

Verification codes
Paste secrets into the box to get 6-digit codes

Codes are computed in your browser (RFC 6238) — secrets are not sent to the server. Only use for your own accounts.

Developer API

Developer API

Free

Call this exact tool from your code over JSON REST — same result as on the web, authenticated with an API key.

Endpoint

POST https://sieutool.net/api/v1/tools/2fa-code

Auth: send the X-API-Key header — create a free key in Account → API keys.

  • Rate limit60 requests/min
  • Daily quota1.000 requests/day
  • PriceFree · up to 100 items/request

Request parameters

ParameterTypeDescription
secrets *stringSecret 2FA — Mỗi dòng 1 secret (tối đa 100): base32, tài khoản|pass|SECRET hoặc otpauth://totp/… (mỗi dòng 1 mục)
timestringThời điểm Unix (tuỳ chọn) — Giây; bỏ trống = giờ máy chủ

* required. Send JSON in the body, Content-Type: application/json.

Code examples

curl -X POST 'https://sieutool.net/api/v1/tools/2fa-code' \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: $NXP_API_KEY" \
  -d '{"secrets":"JBSWY3DPEHPK3PXP\[email protected]|matkhau|GEZD GNBV GY3T QOJQ","time":1700000000}'

Sample response

{
  "ok": true,
  "tool": "2fa-code",
  "version": "1.0.0",
  "data": {
    "time": 1700000000,
    "items": [
      {
        "line": 1,
        "ok": true,
        "label": "JBSW…3PXP",
        "issuer": null,
        "code": "324550",
        "next_code": "367665",
        "digits": 6,
        "period": 30,
        "algorithm": "SHA1",
        "remaining_s": 10
      },
      {
        "line": 2,
        "ok": true,
        "label": "[email protected]",
        "issuer": null,
        "code": "017492",
        "next_code": "907147",
        "digits": 6,
        "period": 30,
        "algorithm": "SHA1",
        "remaining_s": 10
      }
    ]
  }
}

Try it (live call)

No API key yet? Sign in and create a free key, then paste it below. Create API key
Paste your API key (kept in this page only, never stored) and send a request. Test requests count toward your key's rate limit.

Main error codes

HTTPcodeMeaning
400BAD_INPUT / NO_INPUT / TOO_MANY_UNITS / BAD_NUMBER…Invalid input — the message names the field
401MISSING_API_KEY / INVALID_API_KEY / REVOKED_API_KEYMissing, invalid or revoked API key
429RATE_LIMITED / IP_RATE_LIMITEDPer-minute rate limit exceeded — wait for Retry-After
429DAILY_QUOTA_EXCEEDEDDaily quota used up — the upgrade field suggests a paid plan
429CLUSTER_QUOTA_EXCEEDEDLinked accounts (same device/network) used up the daily quota — the free quota is shared across the group, not multiplied per account
503SERVER_BUSY / TOOL_BUSY / API_DISABLEDServer under heavy load or API paused — wait for Retry-After

Every response carries X-RateLimit-Remaining / X-RateLimit-Remaining-Day; 429/503 errors include Retry-After (seconds).

How to use

This tool generates two-step verification codes (TOTP) from secrets — like Google Authenticator, but on the web and for many accounts at once. Codes are computed in your browser following RFC 6238; secrets are not sent to the server.

  1. Paste secrets into the box, one account per line. Accepts base32 strings (e.g. JBSW Y3DP EHPK 3PXP — spaces and lowercase are fine), account|password|SECRET lines, or otpauth://totp/… links.
  2. The 6-digit code appears next to each line with a countdown ring; codes refresh automatically.
  3. Click a code or its Copy button to copy one code, or Copy all for the whole list.

Frequently asked questions

Not on the web. Codes are computed with WebCrypto right in your browser; the server only records 1 run (without the secret). The page does not store secrets in your browser either — reloading clears them.

TOTP depends on the clock. Turn on automatic time on your computer/phone; a drift of more than 30 seconds gives wrong codes. Also check the secret has no missing or extra characters.

Yes, via otpauth:// links with digits (6–8), period (10–300 seconds) and algorithm (SHA1, SHA256, SHA512). Plain secrets use the default 6 digits, 30 seconds, SHA1.

When calling /api/v1/tools/2fa-code the secret must be sent to the server: it is computed in memory, not stored, not logged and not cached. If the secret is sensitive, use the web version or compute TOTP in your own code.
  • Only use for your own accounts or accounts you are lawfully authorized to manage. Do not use it to access other people's accounts.
All Utilities tools →
Sends only the tool name, the last error code and your browser type — never what you typed.