2FA code not working? 7 causes and how to fix them

You typed the 6 digits from your app and the site still says "invalid code"? It is almost always one of these seven things. Work down the list.
1. Your phone or computer clock is off (the #1 cause)
TOTP codes are computed from the time on your device. If your clock is roughly 30 seconds or more fast or slow, the app is computing a different time step's code and the server rejects it.
Fix it:
- Android: Settings → System → Date & time → turn on "Set time automatically" and "Set time zone automatically". Older Google Authenticator versions also have Settings → "Time correction for codes".
- iPhone: Settings → General → Date & Time → "Set Automatically".
- Windows: Settings → Time & language → Date & time → "Sync now".
- macOS: System Settings → General → Date & Time → "Set time and date automatically".
To measure your clock offset in seconds, open Code2FA → Tools → Clock check. Code2FA also corrects for the offset automatically.
2. You typed it right as it changed
If the countdown had 1–2 seconds left, the code may have expired by the time you hit submit. Wait for a fresh code and enter it straight away.
3. You used another account's code
With several accounts on the same service it's easy to copy the wrong row. Name entries clearly in your app and check the account label under each code.
4. The secret key was mistyped
2FA keys use Base32: letters A–Z and digits 2–7, no 0, 1, 8 or 9. Typing by hand, O vs 0 and I/L vs 1 are easy to confuse. A key with one wrong character still produces valid-looking codes that never match. Paste the key into Code2FA's Key check to spot bad characters.
5. The key was replaced
Every time you turn 2FA off and on again, or choose "change authenticator app", the service issues a new key. Codes from the old entry stop working. Delete the old entry and scan the new QR code.
6. The service uses non-default settings
Most services use 6 digits, 30 seconds and SHA1. A few use 8 digits, a 60-second period or SHA256. If you typed the key instead of scanning the QR, the app doesn't know that. In Code2FA, tap ⚙ to set digits, period and algorithm. Steam uses its own 5-character codes (enable "Steam Guard").
7. Wrong input box
Some pages have separate fields for an app code and an SMS or backup code, or are actually asking for an emailed code. Read the label above the box.
Still stuck?
- Use a backup code you saved when you enabled 2FA. See what backup codes are.
- Sign in from a device you normally use: many services skip 2FA on trusted devices.
- Use the service's official account recovery. Don't trust "account unlock" services you find online.
FAQ
Why does Google Authenticator say my code is wrong?
Usually because your phone clock is off. Turn on automatic date and time. Other causes: entering the code as it changes, the wrong account, a mistyped key, or an old key that was replaced.
Can wrong 2FA codes lock my account?
Many failed attempts in a row can temporarily block sign-in for minutes to hours. Check your clock and key before trying again.


