Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

totp-tools

An open-source 2FA / TOTP toolkit and a small set of everyday web utilities, designed to deploy for free on Cloudflare Pages. Pure static, zero build step, runs entirely in the browser.

Live demo: https://totp-tools.pages.dev

✨ Features

  • 2FA multi-account manager — store as many accounts as you need locally; automatic 30-second refresh with per-account circular countdown ring; add by Base32 secret, scan a QR code, or import from a saved image; rename inline; reorder, copy, regenerate QR; live search; JSON import / export for backup
  • Text utilities — dedupe, sort, case conversion, character / word / byte counts, Base64 / URL / Hex encode-decode, JSON pretty-print and minify, regex find-and-replace, line numbering, character frequency analysis
  • Image utilities — drag-drop / paste / pick a file, resize, compress, convert between JPG / PNG / WEBP, copy as Base64
  • Currency converter — live FX rates from Frankfurter / ECB, no API key required
  • More tools — UUID v4, secure password generator, timestamp converter, SHA-1/256/384/512 hashing, QR code generator, JWT decoder, color converter (HEX / RGB / HSL / HSV with picker), number-base converter (2 / 8 / 10 / 16 plus arbitrary 2-36)
  • Light / dark / auto theme — toggle in the sidebar, preference is remembered locally
  • In-app navigation — switching between tools never reloads the page; the sidebar acts as a SPA router so timers, focus state, and library globals are preserved

🔒 Privacy

Every tool runs entirely in the browser. Secrets, images, and text are never sent to any server. The only outbound call the site makes is to frankfurter.dev for exchange rates (currency codes only, no user data).

🗂️ Layout

public/
├── index.html       # 2FA multi-account manager
├── note.html        # Text utilities
├── work.html        # Image utilities
├── money.html       # Currency converter
├── more.html        # UUID / password / timestamp / hash / QR
├── _redirects       # Cloudflare Pages route (/2fa/* → index.html)
└── assets/
    ├── css/style.css
    ├── img/favicon.svg
    └── js/
        ├── common.js              # Sidebar, toast, clipboard, SPA router
        ├── otpauth.umd.min.js     # MIT, hectorm/otpauth 9.3.4
        ├── qrcode.min.js          # MIT, davidshimjs/qrcodejs
        └── jsQR.js                # Apache-2.0, cozmo/jsQR

No bundler, no build script. Any static host will serve it.

🚀 Deploy to Cloudflare Pages

Option 1 — One-shot Wrangler deploy (recommended)

npx wrangler login                                                         # one-time
npx wrangler pages deploy ./public --project-name totp-tools

Wrangler creates the project on first run. Re-run the command to publish updates.

Option 2 — Connect a Git repository

  1. Push the repo to GitHub.
  2. In the Cloudflare dashboard go to Workers & Pages → Create → Pages → Connect to Git.
  3. Pick the repo. Leave Build command empty. Set Build output directory to public.

Option 3 — GitHub Actions

The repo ships with .github/workflows/deploy.yml. Add two repository secrets:

  • CLOUDFLARE_API_TOKEN — created at Cloudflare API Tokens using the Edit Cloudflare Workers template
  • CLOUDFLARE_ACCOUNT_ID — visible at the bottom-right of the Cloudflare dashboard

Pushing to main will deploy automatically.

🛠 Local preview

cd public && python3 -m http.server 8080

Open http://127.0.0.1:8080.

📜 License

MIT. Bundled third-party assets:

  • otpauth by Héctor Molinero Fernández — MIT
  • QRCode.js by Sangmin Shim — MIT
  • jsQR by Daniel Cohen Gindi — Apache 2.0

About

Open-source 2FA / TOTP multi-account manager + handy web utilities. Pure static, zero build, deploys free on Cloudflare Pages.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages