Paste a 2FA secret, get a time-based code instantly.
Zero tracking. Zero logs. Zero ads. Your secret never leaves your browser.
🚀 Live Demo · 📝 Report Bug · ⭐️ Star the Project
- 🔒 100% Client-Side — Your secret key is never sent anywhere. All TOTP generation happens in your browser using the Web Crypto API.
- 📋 Paste from Clipboard — One click to paste your Base32 secret.
- ⏱ RFC 6238 Compliant — Standard TOTP with 30-second time step and 6-digit codes.
- 📱 Responsive — Works on desktop and mobile.
- 🌙 Dark Theme — Easy on the eyes.
- 🚫 No Dependencies — Pure HTML, CSS, and JavaScript. Zero libraries, zero trackers, zero bloat.
- ⚡ Fast — Generates codes in milliseconds.
- Open the live page.
- Paste your Base32 2FA secret key into the input box (or type it manually).
- Click Submit — your 6-digit TOTP code appears instantly.
- Click Copy to copy the code and use it for authentication.
The TOTP (Time-Based One-Time Password) algorithm works in four simple steps:
Secret (Base32) → Decode → HMAC-SHA1 → Truncate → 6-Digit Code
- Base32 Decode — Your secret key (e.g.,
JBSWY3DPEHPK3PXP) is decoded from Base32 into raw bytes. - Time Counter — The current Unix timestamp is divided by 30 (the time step) to create a moving counter.
- HMAC-SHA1 — The counter is hashed with your secret using HMAC-SHA1 via the browser's native Web Crypto API.
- Dynamic Truncation — The hash is truncated to produce a 6-digit code that changes every 30 seconds.
| Technology | Purpose |
|---|---|
| HTML5 | Structure |
| CSS3 | Styling (pure, no frameworks) |
| JavaScript (ES2020+) | TOTP algorithm & interactivity |
| Web Crypto API | Cryptographically secure HMAC-SHA1 (native, no libraries) |
| Clipboard API | Paste & Copy functionality |
This is a static site. Deploy anywhere in seconds:
git push origin mainThen go to Settings → Pages and select main branch with / root.
Just copy index.html to any web server or static host (Netlify, Vercel, Cloudflare Pages, etc.).
You can test with this well-known Base32 secret:
JBSWY3DPEHPK3PXP
⚠️ This is a demo secret from TOTP RFC examples. Use your real secret for actual 2FA codes.
This project is open source under the MIT License.
Made with ❤️ by Yesmohsen
⭐️ Star this Project on GitHub if you find it useful!
