Skip to content
OddsockLocal
Local
Source text

Formatting

1 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste the Base32 secret or the otpauth://totp link.
  2. Leave the algorithm, digits, and period alone unless the issuer specified otherwise.
  3. Read the code and type it into the site. Do not screenshot the secret.
  4. For a new enrollment, switch the output to a setup QR and scan it from the authenticator, then switch back to code and confirm a match.

What is 2FA code generator?

An authenticator code is a six-digit number that changes every 30 seconds, computed from a shared secret and the time. This page does that calculation for a Base32 secret or an otpauth://totp link. The opening settings are SHA-1, 6 digits, and a 30-second period, which is what almost every site emits. SHA-256, SHA-512, 8 digits, and a 60-second period are there for the accounts that say so in the link. If you paste an otpauth URI, the algorithm, digits, and period are read from the link.

Read more

You can also mint a new 20-byte secret, show the setup URI, or draw a setup QR so another authenticator can enroll. The QR is the same idea as the Wi-Fi code: a phone camera reads it, and here the payload is the otpauth link rather than WIFI:. The secret is as sensitive as the password. The page does not store it. Pasting a live bank secret onto a shared screen is publishing it to everyone who can see the screen.

Codes depend on the clock. A machine whose time is minutes off will disagree with the site. You can type a Unix timestamp to compute the code for a specific moment, which is how you check a vector. Leave it empty to use now.

Use cases

  • A new service gives a Base32 secret and you need the current 6-digit code.
  • An otpauth link from a QR you already decoded is pasted in to confirm the code.
  • A self-hosted admin mints a secret and a setup QR for an account they control.
  • A test vector is checked by typing the Unix time from the spec.
  • Someone verifies an 8-digit, 60-second account without installing another phone app.

A standard six-digit code

A Base32 secret, output set to code, SHA-1, 6 digits, period 30, timestamp empty.

Six digits for the current 30-second window. The same secret in the next window produces a different code. A new secret action instead returns 20 random bytes encoded as Base32.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

No. It sits in the field while you use it. Clear the field when you are done. A secret left on a shared computer is a second factor anyone at that desk can mint.