Skip to content
Tools home/2FA code generator

2FA code generator

Generate one-time codes in batches locally.

Using this tool

Enter a Base32 TOTP secret already linked to an account you manage. Codes use HMAC-SHA-1, six digits and 30-second intervals; the tool does not enable two-factor authentication or sign in for you.

Your tool inputs and processing results are not published as part of this page. Review the tool instructions before entering sensitive information.

TOTP guide

Generate your two-factor codes in the browser

Calculate current codes locally from the TOTP secrets already linked to your accounts. Batch processing, labels, automatic updates and encrypted profiles are supported. This tool does not enable two-factor authentication or connect to or sign in to accounts.

Features

Generate a code once or reuse a local encrypted profile.

Batch generation with labels

Process up to 200 secrets per batch. Add labels after a vertical bar; results retain input line numbers.

Countdown and automatic updates

Codes use 30-second windows. Time is checked when the page returns to the foreground; stale results cannot be copied before updating.

Per-line secret validation

Whitespace is removed and case normalized. Strict Base32 checks flag invalid rows without blocking valid ones.

Copy and TXT export

Click a code to copy it, or copy and export all valid codes. TXT contains current codes, not a secret backup.

Encrypted profiles and backups

Explicitly save secrets and labels under a separate encryption password. Load, rename or delete profiles, and import or export encrypted JSON backups.

No sign-in, local calculation

Codes are calculated in this browser. The tool does not upload secrets, labels or codes; temporary input is separate from saved profiles.

How to use

Use only secrets for accounts you are authorized to manage and have already enrolled.

  1. Prepare your linked secret

    Enroll an authenticator through the account security settings and keep the Base32 setup secret securely.

  2. Enter one secret per line

    Use “secret | label” to distinguish accounts. Enter the raw secret, not a full otpauth:// URI, recovery code or login password.

  3. Generate and review

    Select Generate codes and check labels and line numbers. Correct flagged rows and generate again.

  4. Use the code before it expires

    Copy the six consecutive digits to the matching platform. Near the end of the countdown, wait for the next window before copying.

  5. Optionally save an encrypted profile

    Open Save profiles / Import and manage, set a separate unlock password and save a named profile. Export an encrypted backup for migration and retain its original password.

Specifications and data handling

Check the platform’s TOTP settings, then choose temporary use or encrypted storage.

Secret format and calculation
This page uses Base32 secrets, HMAC-SHA-1, six digits and a 30-second period. It does not provide SMS, push, HOTP or alternative algorithm and digit settings.
Input and environment limits
Up to 200 secrets per batch. HTTPS or localhost is required for browser cryptography. Enable automatic device time synchronization.
Temporary workspace
Unsaved input and results remain in page memory and clear on refresh, close or leaving this tool. Clearing input does not delete saved profiles.
Encrypted storage and migration
Explicitly saved secrets and labels use AES-256-GCM with a PBKDF2-SHA256-derived key. The password is not stored. Profiles stay in this browser without automatic sync; backups require the original unlock password.

Use cases

For accounts already using compatible TOTP, without replacing platform enrollment or recovery.

Ad account verification

Generate login codes for ad accounts you may manage. Check labels to avoid copying a code for the wrong account.

Store and website administration

View current codes with account labels when managing stores or websites that use the same TOTP settings.

Check an existing secret

Compare the current code with the enrolled authenticator. Successful generation confirms calculability, not platform acceptance.

Personal backup and migration

Export saved profiles as encrypted JSON and import them after creating or unlocking a vault in another browser. Keep the file and original password separately.

FAQ

First check device time, the enrolled secret and the platform’s TOTP settings.

Why does the platform reject my code?

Check the account, whether the secret is still enrolled, and device time. The platform must use SHA-1, six digits and 30 seconds. Near expiry, wait for the next code; if failures continue, use the platform’s recovery process.

Why does Refresh now show the same code?

A secret produces the same result within one 30-second window. Refresh recalculates that window without extending validity. The next window is calculated when the countdown ends.

How do I fix a secret format error?

Use the raw Base32 secret with letters A–Z and digits 2–7. Whitespace is removed and either case is accepted. Recheck the trusted source instead of deleting unexpected characters to force validity. QR codes and full otpauth:// URIs are not parsed here.

Are entered secrets saved automatically?

No. Only explicitly saving in profile management writes encrypted secrets and labels to this browser. Temporary input clears when you leave; clearing input does not remove saved profiles.

Can I recover secrets if I forget the vault password?

The tool does not store the unlock password and cannot reset it to decrypt old profiles. Backups also require the original password. Use a separately kept secret or platform recovery. Clearing the vault only deletes local data.

Can I use it offline? Is sign-in required?

No sign-in is required. Once the page and required resources have loaded, code calculation needs no network while the tab remains open. First visits and offline reloads are not guaranteed. Cryptography requires HTTPS or localhost and accurate device time.

Can an account name or phone number replace the secret?

No. TOTP requires the enrolled secret; an account name, phone number, old code or recovery code cannot reconstruct it. This tool receives no SMS and does not bypass verification. Use official account recovery if the secret is lost.

Does changing timezone change the code?

Changing only the display timezone does not change TOTP, which uses a timestamp. Device clock drift does affect it. Synchronize system date and time rather than manually shifting the clock to match a code.

Using this tool

Enter a Base32 TOTP secret already linked to an account you manage. Codes use HMAC-SHA-1, six digits and 30-second intervals; the tool does not enable two-factor authentication or sign in for you.

Your tool inputs and processing results are not published as part of this page. Review the tool instructions before entering sensitive information.

Read the free tools workflow guide ↗

Related tools

Reference documentation