Otplib
TypeScript-first TOTP and HOTP one-time password library for multi-runtime use, generating and verifying time-based and counter-based authenticator codes for two-factor login.
Otplib at github.com/yeojz/otplib is a free MIT TypeScript-first TOTP and HOTP one-time password library for multi-runtime use, npm otplib 13.6.0, generates and verifies time-based and counter-based authenticator codes for two-factor login, no sold commercial tier (data as of Nov 22, 2026).
*This is an affiliate link, we may earn a commission at no extra cost to you.
Is Otplib free?
Otplib: Otplib is free open-source software released under the MIT License; the otplib package latest 13.6.0 on npm has no declared Node engines. It generates and verifies TOTP time-based and HOTP counter-based one-time codes, with secret encoding, issuer and account labels compatible with authenticator apps, across Node.js and browser runtimes for two-factor login. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Check the official page for current status before relying on it.
Frequently Asked Questions
Is Otplib free?
The code is free to self-host, but a hosted plan from the vendor may not be. Otplib publishes its source, so cost depends on where you run it.
How much does Otplib cost?
Otplib is free open-source software released under the MIT License; the otplib package latest 13.6.0 on npm has no declared Node engines. It generates and verifies TOTP time-based and HOTP counter-based one-time codes, with secret encoding, issuer and account labels compatible with authenticator apps, across Node.js and browser runtimes for two-factor login. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). Usage volume, plan limits and add-ons can push the bill above the figures shown, so confirm the current numbers on the vendor page before committing.
Where can I check Otplib's current pricing?
On Otplib's official site, linked from this page. We only publish a price after reading the vendor's own pricing page, so if this page shows no number, it means no traceable public price is on file — not that the tool is free.
What is Otplib?
A shared secret is combined with the current time step for TOTP or a moving counter for HOTP, passed through HMAC and truncated into a numeric code; the verifier repeats the derivation for nearby time steps or counters and compares the submitted code against the generated value.
How does pricing work?
The package installs free under MIT with no seat license; it generates and verifies codes in-process, and commercial support would be outside the open-source project.
How does Otplib compare with other tools in Dev Workflow & Productivity?
Otplib is listed in the Dev Workflow & Productivity category, alongside 2 other tools we track here. 2 of those 2 peers have a dated price we read from the vendor's own pricing page, and the table below shows each tool's pricing model next to the exact rate on file — so the comparison is between published numbers, not between marketing pages.
| Tool | Pricing model | Key pricing on file | Price checked |
|---|---|---|---|
| Otplib | Open source | Otplib is free open-source software released under the MIT License; the otplib package latest 13.6.0 on npm has no declared Node engines. It generates and verifies TOTP time-based and HOTP counter-based one-time codes, with secret encoding, issuer and account labels compatible with authenticator apps, across Node.js and browser runtimes for two-factor login. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
| Jsonwebtoken | Open source | Jsonwebtoken is free open-source software released under the MIT License; the jsonwebtoken package latest 9.0.3 on npm requires Node.js >= 12. It signs claims into compact JWT strings with HMAC secrets or RSA and ECDSA private keys, and verifies signatures, expiration and issuer claims on the receiving side, so web APIs can issue and validate stateless access tokens. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
| Jose | Open source | Jose is free open-source software released under the MIT License; the jose package latest 6.2.18 on npm has no declared Node engines. It covers JWS signing and verification, JWE encryption and decryption, JWK key serialization and JWKS set resolution, running in Node.js, browsers and edge Workers with a Promise-based API. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026). | Nov 22, 2026 |
3 of these 3 entries carry a specific price we read from the vendor's site. Where the column says there is no dated price on file, we have not verified a rate — treat that as unknown rather than free, and check the vendor's page before you budget for it.
Full pricing breakdown
Otplib's source code is publicly available, so you can run or build it yourself. The project may also sell a paid hosted or cloud plan — check the official site for current pricing.
Open source does not always mean every hosted version is free.
Key pricing: Otplib is free open-source software released under the MIT License; the otplib package latest 13.6.0 on npm has no declared Node engines. It generates and verifies TOTP time-based and HOTP counter-based one-time codes, with secret encoding, issuer and account labels compatible with authenticator apps, across Node.js and browser runtimes for two-factor login. No paid commercial edition or per-seat license is sold by the project (data as of Nov 22, 2026).
Estimate your monthly bill with our calculator →Or build a full stack around your budget →Pricing Guides & Comparisons
Plan prices in these guides are read from each vendor's own pricing page, with the date we checked them.
⭐ Rate this tool
How would you rate this tool?
🚀 Never Miss a New AI Coding Tool
Join 1,000+ developers getting our weekly roundup: new AI tools, student free tiers, exclusive discounts, and side project deals. No spam, unsubscribe anytime.
Current Alternatives
Jsonwebtoken
JSON Web Token implementation for Node.js, signing and verifying JWTs with symmetric HMAC and asymmetric RSA or ECDSA keys, used to issue and validate access tokens in web APIs.
Jose
JWT, JWS, JWE, JWK and JWKS toolkit for Node.js, browsers and Cloudflare Workers, signing, encrypting, verifying and resolving JSON Web Keys across JavaScript environments.
Tool Information
- Official Websitegithub.com
- CategoryDev Workflow & Productivity
- PricingOpen Source
- Price checkedNov 22, 2026
