TOTP Generator

Generates current or future time-based codes from a shared secret for developers, security admins, and individuals managing 2FA tokens without hardware devices.

Tool coming soon!

We're working hard to get this tool ready for you.

Request Feature / Support
1,528+
Total Calculations Run
< 15ms
Browser Execution Speed
100%
Client-Side Privacy
4.9 / 5.0
User Satisfaction
AI Web Tool Generator

Build Your Own Custom Web Calculator in Seconds

Type what tool or calculator you need below. Our AI will build it instantly for your site.

Popular ideas:
100% FREE • No Credit Card Required

About This Tool

The tool computes TOTPs from a shared secret following RFC 6238, enabling testing and integration of 2FA flows without hardware tokens. It accepts a base32 secret, digits (6 or 8), an algorithm (SHA1, SHA256, SHA512), and a time step (default 30 seconds). It produces a decimal code that can be used for verification in MFA workflows and for validating server-side OTP logic. Conceptually, the secret is converted to bytes, an HMAC is computed against an 8-byte counter derived from the current time, and dynamic truncation yields a 31-bit value which is reduced modulo 10^digits to form the OTP. The system supports calculating codes for the current time or adjacent time steps to accommodate clock drift. It is a pure computation tool and does not store secrets or render any UI. This makes it suitable for automated tests, integration checks, and security audits where deterministic OTP results are required. Distinct advantages include configurable time_step, digits, and algorithm, along with the ability to generate codes for multiple accounts in a single run for quick verification across MFA scenarios. Typical use cases involve validating server-side OTP validation logic, script-based MFA testing, and developers simulating user sign-ins in test environments. A key differentiator is its RFC-aligned accuracy and its lack of persistent state, which supports repeatable test results across environments.

How to Use

  1. Provide inputs: base32 secret, digits (6 or
  2. , algorithm (SHA1|SHA256|SHA
  3. , and time_step. Optionally set current_time to a specific epoch; otherwise use system time. Run calculation to obtain the OTP for the given timestamp. If needed, compute codes for nearby timestamps to verify drift tolerance. Apply the produced code in MFA verification workflows or test scenarios.
How to use online totp generator

Frequently Asked Questions

Find Quick Answers

What is RFC 6238?
RFC 6238 defines the standard for time-based one-time passwords (TOTP). It specifies how to derive a one-time code from a shared secret and the current time, using HMAC with a chosen hash function and dynamic truncation. This tool implements that method for testing and validation.
Which secret formats are supported?
The tool accepts a base32-encoded shared secret, which is the common format used for TOTP provisioning. Secrets should conform to RFC 4648 base32 encoding to ensure correct byte representation for the HMAC computation.
Can I compute codes for future time steps?
Yes. By supplying a specific timestamp or enabling a drift window, you can generate codes for nearby time steps (t-1, t, t+1, etc.) to test clock skew tolerance in MFA verification workflows.
Is this suitable for production MFA generation?
No. This tool is intended for testing, validation, and development purposes. Do not rely on it for generating live authentication tokens in production, where secure secret handling and hardware-backed solutions are required.

Need to run multiple calculations?

Create a free account today to unlock unlimited daily runs, access advanced parameters, save your history, and request custom features.

Register Free Account

Related Tools

Other useful calculators and utilities you might like

Utility & Miscellaneous Tools

Spotify to MP3 Converter

Convert Spotify tracks and playlists to MP3 format instantly with our free online converter.

Utility & Miscellaneous Tools

Road Distance Calculator

Calculate the driving distance and travel time between two addresses with our free online road dista...

Utility & Miscellaneous Tools

Age Calculator

Calculate your exact age in years, months, and days from any birth date to any target date.

Utility & Miscellaneous Tools

Currency Converter

Convert currencies instantly with real-time exchange rates and historical data support.

Your Feedback Matters

Help Us to Improve