Online 2FA Authenticator
Add a verifier
Codes
Added 0Local security
OptionalEncrypted backup & restore AES-256-GCM
Free TOTP / HOTP Code Generator with Google Migration, QR Code Import and Encrypted Backups
Online 2FA Authenticator
The Online 2FA Authenticator is a browser-based two-factor authentication tool that generates TOTP (Time-Based One-Time Password) and HOTP (HMAC-Based One-Time Password) codes. You can enter a Base32 secret key, paste an otpauth:// URI, import Google Authenticator migration data or supported JSON account lists, or import authenticator accounts by uploading QR code images or scanning them with your device camera.
The tool supports HMAC-SHA1, HMAC-SHA256 and HMAC-SHA512 algorithms, with 6-digit, 7-digit and 8-digit verification codes. TOTP supports 30-second and 60-second time intervals, while HOTP uses an independent counter to generate codes. Manage multiple authenticator accounts on one page, view current codes, countdown timers and counters, and use search, copy, edit, delete, hide and sorting functions to organize your accounts.
All secret parsing, code generation, QR code recognition and encrypted backup operations are performed locally in your browser. Account secrets are not saved automatically. You can optionally enable local browser storage or export password-encrypted backup files.
Key Features
- TOTP Codes: Generate one-time passwords using a Base32 secret key and the current time, with automatic refreshing and real-time countdowns.
- HOTP Codes: Generate verification codes using a shared secret and counter, with support for viewing the current counter and manually generating the next code.
- Multiple Import Formats: Import Base32 secret keys, otpauth:// URIs, Google Authenticator otpauth-migration:// migration data, compatible JSON account lists, Base64-encoded content and multiline text.
- Google Authenticator Migration: Parse Protobuf migration data exported by Google Authenticator and extract multiple authenticator accounts from migration QR codes or otpauth-migration:// links.
- QR Code Image Import: Upload or drag and drop QR code images. Account data is recognized using a local QR code decoding module.
- Camera QR Scanning: Scan authenticator QR codes using your device camera. All recognized data is processed through the unified import preview workflow.
- Multiple Hash Algorithms: Supports HMAC-SHA1, HMAC-SHA256 and HMAC-SHA512.
- Flexible Code Settings: Supports 6-digit, 7-digit and 8-digit codes. TOTP supports 30-second and 60-second intervals, while HOTP uses an independent counter.
- Real-Time Code Refresh: Calculates the current TOTP time step using Unix system time and displays the remaining validity time and progress instead of relying on simple incremental timers.
- Account Management: Add, edit, delete, search, show or hide codes, copy individual codes, copy multiple codes and reorder accounts.
- Import Preview and Validation: Standardizes account data before importing, validates secrets, algorithms, digit lengths, intervals and counters, identifies duplicate accounts and invalid records, and requires user confirmation before adding accounts.
- Optional Local Storage: Accounts are processed only in the current page's memory by default. Account information is written to the current browser's localStorage only after you explicitly enable local saving.
- Encrypted Backup and Restore: Derives encryption keys using PBKDF2-SHA256 and encrypts account data with AES-256-GCM. Supports password verification, backup decryption, data previews and confirmed restoration.
- Local Browser Processing: Secret parsing, TOTP/HOTP generation, QR decoding, and backup encryption and decryption are performed locally in your browser. Account secrets and verification codes are not sent to the server.
How to Use the Online 2FA Authenticator
- Open the security settings of the website where you want to enable two-factor authentication, such as Google, Microsoft or GitHub.
- Obtain the authenticator secret key, otpauth:// URI or QR code provided by the website. Some authenticator apps also allow you to export Google Authenticator migration QR codes.
- Open this tool and select single-account entry, paste import or QR code import according to your data format.
- For manual entry, enter the Base32 secret key and select TOTP or HOTP. Configure the algorithm, code length, time interval or counter to match the original account.
- For bulk import, paste supported URIs, Google migration data, JSON, Base64 or multiline secret data. The tool automatically detects the format.
- For QR code import, select an image, drag and drop an image, or scan a QR code using your device camera.
- Review the issuer, account name, code type and parameters in the import preview. Check duplicate and invalid records, then select the accounts you want to import.
- After confirming the import, view your verification codes in the My Codes section. TOTP displays the remaining validity time, while HOTP displays the current counter.
- Click a verification code to copy it. If the code is hidden, reveal it first before copying.
- To retain accounts for future visits, enable local saving. Alternatively, export an encrypted backup and restore it on another device or after clearing browser data.
Supported 2FA Import Formats
1. Base32 Secret Key Import
Base32 is a commonly used encoding format for shared authenticator secrets. You can paste the Secret Key provided by a website directly. The tool normalizes the characters and performs strict Base32 validation before converting the key into its internal representation for code generation.
When adding an account manually, you can configure the issuer, account name, TOTP or HOTP type, hash algorithm, code length, TOTP time interval or HOTP counter. Invalid Base32 characters and incorrectly encoded secrets are not automatically guessed or converted.
2. otpauth:// URI Import
Supports standard otpauth:// TOTP and HOTP URIs. A URI may contain the secret key, issuer, account name, algorithm, number of digits, time interval or counter.
Example of a standard TOTP URI:
otpauth://totp/Google:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Google&algorithm=SHA1&digits=6&period=30Standard HOTP URIs use the hotp type and specify the counter through the counter parameter. They do not use TOTP time intervals to generate codes.
3. Google Authenticator Migration Import
Supports otpauth-migration://offline?data=... migration data exported by Google Authenticator. Unlike standard otpauth:// URIs, this format uses a Protobuf-serialized structure to store multiple authenticator accounts and transfers the data using Base64 encoding.
The tool parses the data parameter in the migration link, decodes the Protobuf data, extracts account names, issuers, original secret keys, algorithms, code lengths, TOTP/HOTP types and HOTP counters, and then converts the secrets into the internal Base32 format.
Migration data supports SHA1, SHA256 and SHA512 algorithms, as well as 6-digit and 8-digit codes. MD5, unsupported algorithms and invalid parameters are reported as invalid records. They are not automatically converted to other algorithms, preventing incorrect verification codes.
Google Migration is a dedicated migration protocol. It is not ordinary QR code text or a secret key that can be used simply by Base64 decoding. A dedicated Protobuf parser is required to process this format.
4. JSON Account Data Import
Supports recognition of several common JSON account-list structures used by authenticator applications. The parser attempts to identify common account collection fields such as entries, services, items, accounts, tokens, otps, authenticators, vault, list, data and db. Some one-level nested account-list structures are also supported.
Common field names are recognized, including secret, secretKey, secret_key, key, seed, issuer, service, provider, account, username, email, name, type, algorithm, digits, period and counter. The parser also attempts to read nested fields such as info, otp, totp, login, data and details.
The tool can process some Aegis, 2FAS, andOTP, Bitwarden-style, Authy-style and generic JSON account data. Actual compatibility depends on the export file structure and field contents. Encrypted vendor backups cannot be restored through JSON parsing alone.
Important: Password-protected Aegis private encrypted backups, Bitwarden encrypted=true data and other incompatible vendor-specific encrypted formats cannot currently be imported directly. Use the plaintext export option provided by the corresponding application or convert the data into a supported standard account format before importing.
5. Base64-Encoded Content Import
Base64 is a data encoding method, not an independent 2FA authentication protocol. The tool attempts to decode the input and then identify whether the decoded content contains JSON, an otpauth:// URI, Google Migration Protobuf data or readable multiline text.
If the decoded content is not a supported account format or cannot be recognized, the tool displays an import failure message instead of incorrectly treating an arbitrary Base64 string as a valid 2FA secret key.
6. Bulk Text Import
Supports pasting multiple account records at once. Each line can contain an otpauth:// URI, Google Migration data, or a combination of an account name and Base32 secret key. A vertical bar or tab can be used to separate the account name and secret key.
Google|JBSWY3DPEHPK3PXP
GitHub|JBSWY3DPEHPK3PXP
Microsoft|JBSWY3DPEHPK3PXPMultiline text is parsed line by line, with each record checked for valid secrets and parameters. Import results are standardized, and invalid records and duplicates are displayed in the preview.
7. QR Code Images and Camera Scanning
You can upload QR code images, drag images into the QR import area, or use your device camera to scan QR codes. Image decoding uses a local browser-based QR recognition module, so QR code images do not need to be uploaded to the server.
Recognized QR code text enters the unified format detection workflow. Supported content includes standard otpauth:// URIs and Google Authenticator migration data. Accounts are not added automatically after scanning. The parsed results are displayed first so you can review and confirm them.
QR code image processing includes file size, image pixel, decoding dimension and timeout limits to reduce browser memory consumption and prevent page freezes caused by unusually large images.
Import Preview, Validation and Duplicate Account Handling
Data imported from different formats is converted into a unified internal account structure, including account type, secret key, issuer, account name, hash algorithm, code length, time interval and counter.
- Validate Base32 secret keys and reject empty keys, excessively long keys and invalid characters.
- Verify that the algorithm is SHA1, SHA256 or SHA512.
- Verify that the code length is 6, 7 or 8 digits.
- Verify that the TOTP interval is 30 or 60 seconds.
- Verify that the HOTP counter is a valid non-negative safe integer.
- Identify duplicate accounts within the same import batch to prevent repeated additions.
- Check existing accounts. Duplicate records are excluded from importing by default.
- Display invalid records and their specific error types instead of silently ignoring all failed data.
- Allow users to preview and select valid accounts. Bulk import is performed only after confirmation.
Duplicate detection is based on the secret key, account type and relevant verification parameters, not just the issuer or display name. Therefore, accounts using the same secret key and identical parameters can be recognized as duplicates.
How TOTP and HOTP Codes Work
TOTP: Time-Based One-Time Password
TOTP (Time-Based One-Time Password) is defined in RFC 6238. The verification website and authenticator use the same shared secret, time interval and hash algorithm. They calculate a time counter from the current Unix time, then generate a numeric verification code of the specified length through HMAC calculation and dynamic truncation.
A common configuration is HMAC-SHA1, a 6-digit code and a 30-second interval. Both sides must use the same secret, algorithm, code length and time interval to generate matching verification codes.
This tool calculates the current time step using actual Unix time instead of relying solely on incrementing timers. Therefore, even if the page runs in the background or browser timer throttling occurs, the correct current code can be recalculated when the page becomes active again.
HOTP: HMAC-Based One-Time Password
HOTP (HMAC-Based One-Time Password) is defined in RFC 4226. Unlike TOTP, HOTP does not use the current time. Instead, it uses the shared secret and an event counter as the HMAC input to generate verification codes.
The counter must advance each time the next code is requested. The authenticator and verification server must keep their counters synchronized; otherwise, verification codes may not match. This tool displays the current HOTP counter and manages it together with the account data.
Encrypted Backup and Account Restoration
To prevent secret keys from being lost when browser data is cleared, devices are replaced or local accounts are removed, you can use the encrypted backup feature to export authenticator accounts as password-protected JSON files. Encryption and decryption are performed locally in the browser. Plaintext secret keys and backup passwords are never uploaded to the server.
- Backup Password: Protect account data using a password chosen by the user. The password must contain at least 8 characters and no more than 256 characters.
- Key Derivation: Uses PBKDF2-SHA256 with a default of 310,000 iterations.
- Encryption Algorithm: Uses AES-256-GCM authenticated encryption to protect the data and verify the integrity of ciphertext and related backup parameters.
- Random Parameters: Each export uses a randomly generated 16-byte Salt and 12-byte IV.
- Version Management: Backup files use the nztool-2fa-backup format identifier and version number. File formats and encryption parameters are checked during restoration.
- Account Limit: Each backup can process up to 500 account records. Exports or restorations exceeding this limit are rejected.
- Password Verification: The original backup password is required for restoration. Decryption fails if the password is incorrect or the file is damaged.
- Restore Preview: After decryption, account secrets, algorithms and parameters are validated. Valid and invalid records are counted and displayed before the user confirms the import.
- File Security: Users are responsible for storing backup files and passwords safely. If the password is forgotten, this tool cannot recover the secrets contained in the encrypted backup.
Privacy and Security
- Account secrets are stored only in the current page's memory by default and are not automatically written to browser storage.
- TOTP/HOTP codes are generated locally in the browser. Secrets and verification codes do not need to be sent to the server.
- QR code image decoding and camera scanning are performed locally in the browser. QR code images are not uploaded to the server.
- Account data is written to the current browser's localStorage only after you explicitly enable local saving.
- Account secrets stored in localStorage are not encrypted. Enabling local saving on public computers or untrusted devices is not recommended.
- Encrypted backups use PBKDF2-SHA256 and AES-256-GCM. Backup passwords are not stored by the server.
- Local processing does not mean the browser environment is completely secure. Use trusted devices, keep your browser updated and protect against malicious extensions and untrusted webpage scripts.
- Never share your 2FA Secret Key, encrypted backup password or website recovery codes with others.
Frequently Asked Questions
2FA stands for two-factor authentication. An online 2FA authenticator generates one-time verification codes using a shared secret. TOTP codes are generated from the secret and current time, while HOTP codes are generated from the secret and a counter. These codes provide an additional layer of authentication during login.
Enter the Base32 secret key provided by the website, or import a standard otpauth:// URI or QR code. Check the hash algorithm, code length and time interval, then add the account to generate and automatically refresh TOTP codes in your browser.
Yes. The tool recognizes Google Authenticator otpauth-migration:// data and uses a Protobuf parser to extract multiple accounts. The parsed data is converted into the internal account format and displayed in an import preview. Accounts are added only after user confirmation.
Supported formats include Base32 secret keys, otpauth:// TOTP/HOTP URIs, Google Authenticator migration data, compatible JSON account lists, Base64-encoded supported content, multiline text, QR code images and camera scanning. Vendor-specific encrypted backups that require dedicated password decryption may not be directly importable.
The tool can recognize some common vendor JSON account-list structures, including Aegis, 2FAS, andOTP, Bitwarden and Authy-style data. However, export structures may vary between versions. Encrypted backups cannot be imported as ordinary JSON. Private backups requiring password decryption must first be exported into a compatible format using the original application.
No. Base64 is only an encoding method. The tool first attempts to decode the content and then checks whether it contains supported JSON, an otpauth URI, Google Migration data or multiline account text. It is imported as an account only after successful recognition and validation.
TOTP generates codes based on the current time and a configured time interval, usually refreshing every 30 or 60 seconds. HOTP generates codes based on a counter, which must advance each time the next code is requested. The two methods use different synchronization mechanisms and cannot be used interchangeably.
Standard accounts support HMAC-SHA1, HMAC-SHA256 and HMAC-SHA512, with 6-digit, 7-digit and 8-digit codes. TOTP intervals can be 30 or 60 seconds. Google Migration data must also comply with the parameters supported by its migration format. Unsupported parameters are reported as invalid records.
No. QR code image decoding and camera scanning are performed locally in your browser. The recognized text is then processed by the local parsing module. Images, secrets and verification codes do not need to be sent to the server.
No. By default, account secrets are processed only in the current page's memory. Account data is written to the current browser's localStorage only when you explicitly enable local saving. Clearing browser data may cause locally saved accounts to be lost.
Expand the encrypted backup section, set a password of at least 8 characters and export the backup file. To restore accounts, select the backup file, enter the original password, preview the decrypted account data and confirm the import. Keep the backup file and password in a safe place.
Backups use PBKDF2-SHA256 key derivation and AES-256-GCM authenticated encryption. Each export uses a random Salt and IV. Security also depends on the strength of your backup password and how safely you store the backup file. If you forget the password, this tool cannot recover the secrets in the backup.
Check that your device's system time is accurate and that the secret key, TOTP/HOTP type, hash algorithm, code length and time interval match the original account. If you use HOTP, also make sure the counter is synchronized with the verification server.
Encrypted backups derive their encryption keys from the password you provide. There is no server-side password recovery mechanism. If you forget the original password, this tool cannot decrypt the backup. Store your password safely and verify that your backup file can be restored after exporting it.
Free Online 2FA Authenticator - TOTP and HOTP Code Generator
- Generate TOTP and HOTP verification codes, compatible with RFC 6238 and RFC 4226
- Import Base32 secret keys, otpauth:// TOTP/HOTP URIs and multiline text in bulk
- Import Google Authenticator otpauth-migration:// Protobuf migration QR codes and parse multiple accounts
- Recognize compatible JSON account lists and supported Base64-encoded data
- Upload or drag and drop QR code images, or scan QR codes using your camera
- Supports HMAC-SHA1, HMAC-SHA256 and HMAC-SHA512 algorithms
- Supports 6-digit, 7-digit and 8-digit codes, with 30-second and 60-second TOTP intervals
- Calculate TOTP codes in real time with countdowns, while HOTP displays an independent counter
- Search, edit, delete and reorder accounts, hide or reveal codes, and copy multiple codes
- Automatically validate secrets and parameters before import and identify duplicate or invalid records
- Processes accounts in browser memory by default, with optional localStorage saving
- Encrypt and restore 2FA accounts using PBKDF2-SHA256 and AES-256-GCM
- Secret parsing, QR recognition, code generation and backup encryption are performed locally in your browser