thoughtasylumTOOLBOX Preview Guides Use offline Automate Feedback

Tools › Security

TOTP / HOTP Codes

The current one-time code from an authenticator secret or otpauth:// link, the codes either side, a QR code to add it to an authenticator app, and a check of a code.

About this tool What it's for, how to use it and an example

What it's for

Make the one-time codes that authenticator apps show for two-factor sign-in, from the secret behind them, and the QR code that adds a secret to an app. Time-based codes (TOTP) change every 30 seconds; counter-based ones (HOTP) change each time they’re used.

  • When you’re testing two-factor sign-in on an application you’re building, and want codes without reaching for a phone.
  • When you’re moving an account to a new authenticator and have its setup key or otpauth:// link.
  • When you’re checking that a secret and an app agree.

How to use it

Paste a Base32 secret (the “setup key” a site shows beside its QR code) or a whole otpauth:// link, or choose Make a new secret. The current code appears with the next and previous ones and a countdown, each with Copy and Spell it out buttons. A link carries its own settings; for a bare secret, choose the kind, algorithm, digits, period or counter, and an issuer and account name for the QR code. Scan the QR code with an authenticator app to add the secret to it, or copy the otpauth:// link.

Type a code under Check a code to see whether it’s right now, or for the period either side, which most services also accept to allow for clocks that drift.

Example

Paste this secret (the RFC 4226 test secret, 12345678901234567890 in Base32), choose HOTP and leave the counter at 0:

GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ

The code for counter 0 is 755224, and for counter 1 287082, as the standard says.

Good to know

Codes depend on this device’s clock, so a clock that’s wrong by more than a period gives wrong time-based codes. The secret is never saved or put in a link, but anyone with it can make your codes, so don’t paste the secret of an account you care about into a device you don’t trust. Steam’s and other non-standard codes aren’t supported.

Guides: Handling passwords and tokens in your own app · Strong passwords, two-factor codes and shared secrets

Take care with secrets. This runs only in your browser: what you enter isn't uploaded, stored or put in a link, and the page is built so that it can't send it anywhere else. Your browser's extensions and other software on your device can still see what's on screen, so use a device you trust and real secrets only when you need to. Disconnecting from the internet once the page has loaded gives the most protection. Use is at your own risk: see the terms.

Check a code

The secret stays on this page: it isn't saved or put in a link. Anyone with the secret can make your codes, so treat it like a password.

Built with The third-party code and data this tool uses, and their licences

This tool runs on the following open-source work, copied onto this site and served from it:

QR Code Generator 2.0.4
Copyright
Copyright (c) 2009 Kazuhiko Arase
Licence
MIT License
Source
github.com/kazuhikoarase/qrcode-generator
Notes
QR Code is a registered trademark of DENSO WAVE INCORPORATED.

Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.

Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

Saved you a few minutes? Say thanks with a coffee.

Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

↑ ↓ move↵ openesc close