Free › 2FA Code Tester

Free live tool

2FA Code Tester.

See how authenticator app codes are made. Watch them change, scan a QR code, and find out why a code gets rejected.

Runs in your browser. Your secret is never sent anywhere. Use test secrets only.

Tester

A secret and the clock.

The same secret and the same time give the same code on every device. That is all a 2FA app does.

Test secrets only. Never paste the real secret of an account you care about into any website, including this one. Make a new secret here to try it with an authenticator app.
Code right now
--- ---

Next code

Why a code gets rejected

Servers usually accept the codes either side of the current one, to allow for small clock differences. Move the slider to pretend the phone clock is wrong.

Phone clock is off by0 seconds

Scan it into an app

How it works

No message. Just maths.

The secret

Shared once, by QR code.

When you set up 2FA, the site shows a QR code. It holds a secret. Your app and the site both keep a copy, and the secret never travels again.

The clock

Time makes the code.

Every 30 seconds, both sides run the secret and the current time through an HMAC function (RFC 6238) and keep six digits. Same inputs, same code, with no network needed.

SMS

Why texts are weaker.

A text code can be redirected by a SIM swap, or read from a stolen phone. An app code never crosses the phone network. A passkey or security key is stronger still.

A wrong clock.If the phone clock drifts by more than the server allows, every code fails. Switch on automatic time, then try again.
Treating the QR code as harmless.The QR code is the secret. A screenshot or a photo of it is a copy of your second factor, so keep it as private as a password.
Thinking 2FA stops phishing.A fake login page can ask for your code and pass it on within seconds. Passkeys and security keys check the real site, so they resist this.

More free tools.

Lessons and tools. No sign-up.