X account security
X (Twitter) Two-Factor Authentication Guide
X offers several security checks, but they do not all accept the same code. This guide explains authentication-app setup, recovery preparation, and where a browser-based TOTP generator fits without confusing it with SMS, account verification, or a security key.
Start while you can still access the correct X account. Keep your existing session open, check that you know its password, and make sure you can reach its registered email. A working authenticator is only part of the job: you also need a way back in if that authenticator becomes unavailable.
Before switching back to your account: Keep the X authentication-app prompt ready so you can copy and submit a fresh number promptly. The generator clears its key and result on a hidden tab or app switch. Complete manual copying here if necessary; Clear does not erase your device clipboard.
Choose authentication-app 2FA, not a different check
An authentication app generates time-based one-time passwords, usually called TOTP codes. SMS delivers a code through your phone number instead. X restricts SMS two-factor authentication to Premium subscribers, with availability also depending on country and carrier. That restriction does not make an authentication-app code a Premium-only feature. A security key is another method, using a registered physical authenticator rather than a rotating number. Choose the method you can maintain and recover, not simply the first option visible in a login prompt.
Read the prompt before looking for a code. A request for the number texted to your phone needs that particular message; an authentication-app request needs the generator enrolled with this X account. A security-key prompt needs the registered key. This tool cannot turn one method into another, receive messages, approve a push request, or supply an account-ownership check. If you previously used SMS, adding a TOTP secret to a generator does not by itself change your X settings.
Enroll through X security settings
On desktop, the documented route is More > Settings and privacy > Security and account access > Security > Two-factor authentication. Select Authentication app, then Start. Enter your password if requested and complete email confirmation if X asks. Link your authenticator using the QR code, continue with Next, and submit its generated code with Verify. Finish the confirmation screen. X also documents this security settings grouping in its mobile apps, although layout and wording can vary.
Do not treat an entry appearing in your authenticator as proof of completed enrollment. The decisive step is X accepting the verification code and completing setup. Keep the original session available until you have checked your recovery options. X documents QR-based linking; it does not promise a manual-key button in every interface. If your screen only offers a QR code, use a compatible authenticator that can scan it. Do not invent a secret or upload the QR image to an unknown decoding website.
Use this tool only with the actual setup secret
The online 2FA authenticator accepts a raw Base32 TOTP secret. It does not scan QR images or accept an entire otpauth URI. Use it for this account only if you legitimately have the corresponding raw key. Your X password, username, current six-digit code, SMS message, and backup code are not substitutes. For a first look at the controls, use the explicit public demo rather than a private account key. Generating a plausible number is not evidence that X recognizes it.
This tool starts with SHA1, six digits, and a 30-second interval. Its advanced settings are manual: a raw key does not identify its algorithm, code length, or interval. Do not cycle through alternatives just to obtain different numbers. Code generation happens locally, but that is not a guarantee against a compromised browser, extension, or replaced page interface. Use a trusted device, clear the input when finished, and remember that copied secrets or codes can remain in clipboard history. This tool is not a persistent authenticator backup.
Check the input
Have a raw TOTP setup key?
Use the generator for that secret only. Keep X passwords, SMS messages, and recovery codes out of its input.
Save X backup codes before changing devices
X says a backup code is generated when you enable 2FA through its iOS or Android app, and codes can also be generated on the web. Its backup-code help documents the mobile route Settings and privacy > Account > Security > Backup code. This older grouping differs from its main setup article, so labels may vary. Save the code securely outside the device you might lose. X documents up to five active backup codes and warns that using a later-generated code invalidates earlier ones.
At login, use the backup-code option after your usual username and password when the second-factor prompt appears. Backup codes are different from X temporary passwords and from a reusable setup secret. Before replacing a phone, verify your new authenticator arrangement while access remains available; do not assume installing the same app restores its entries. If you lose the authenticator and have neither an active backup code nor usable account access, X directs you to support. This tool cannot create a replacement recovery credential.
Diagnose a rejected code without weakening security
First establish whether the screen actually requests an authentication-app code. Then check the selected account entry, especially if you maintain several X handles or kept an older enrollment. A key from a previous setup can continue producing well-formed numbers after it stops being the key the service expects. Repeatedly copying those numbers will not repair the relationship. Check your device clock and its automatic time setting, then use a newly refreshed code rather than one about to expire. This tool does not synchronize your clock with X.
If the numbers still fail, review the exact key and parameters you entered. Preserve leading zeroes in the displayed code, and do not accidentally submit the secret in the login field. Compare against your established authenticator only when both are deliberately configured from the same valid setup. Agreement shows that they are generating alike; it does not prove the key is still enrolled. Use a saved backup option or your existing session for account-side changes instead of disabling protection as a first troubleshooting experiment.
Separate login alerts from account verification
An email or push alert about a new or suspicious login is not your TOTP setup key. X uses these alerts to help you recognize activity, and the reported location is approximate because it is derived from an IP address. If the activity was not yours, follow X security guidance and change your password. Open X directly to inspect the account rather than trusting an unexpected message link. A correct rotating code cannot protect you if you voluntarily give it to a convincing fake login page.
A locked or limited account can face a separate ownership or anti-abuse check involving phone, email, or a CAPTCHA. Complete the check actually shown; successfully generating TOTP codes does not remove those requirements or reverse a restriction. Keep access to your account email and treat recovery messages as sensitive. The useful boundary is simple: your authenticator handles the enrolled second factor, while X controls account verification, restrictions, and recovery. This tool calculates codes and does not sign in to X or change any of those decisions.
Questions about X / Twitter 2FA
Do I need X Premium to use an authentication app?
The Premium restriction concerns SMS 2FA, not the authentication-app method. SMS availability also varies by carrier and country. Use the method actually enabled on your account; a subscription does not enroll an authenticator for you.
Can I recover my X setup key from one six-digit code?
No. A displayed code is temporary output, not the reusable secret. This tool needs the real raw setup key. If you no longer have the enrolled authenticator, look for your backup access rather than trying to reverse a code.
Why does X still ask for phone or email verification?
That may be a separate account-security or ownership check rather than the authentication-app challenge. Read the exact request. Neither an authenticator nor this tool can replace the requested verification or guarantee that a locked account will be restored.
Continue with another authenticator guide
Use the Online 2FA Authenticator with your existing setup key, or choose a related guide. More utilities are available in all free tools.
Keep recovery separate
Generate a code without changing your X account
Use the public demo to explore, or enter your own valid raw key on a trusted device.