Smart Lock Code Generator

Generate per-booking lock codes you can re-derive on demand. Same booking ID + secret produces the same code, every time.

Smart lock code rotator - Deterministic per-booking codes (HMAC-SHA-256). No spreadsheets, no reuse.
Booking IDLock code

These codes are deterministic — the same booking + secret always produces the same code. Store your secret somewhere safe (a password manager). Rotate it if it leaks.

How it works

We compute HMAC-SHA-256 of your booking ID using your secret as the key, then take the result mod 10^digits and zero-pad to length. The output is deterministic and unique-by-booking — no storage required.

How to use this tool

  1. Pick a strong host secret (treat like a password).
  2. Choose your code length (4-8 digits, depending on lock model).
  3. Paste your booking IDs — one per line.
  4. Copy each code into your lock app or PMS.

FAQ

Is the code unique to each booking?

Yes. Same booking ID + secret -> same code; different booking ID -> different code.

Why deterministic?

You can regenerate the same code at any time without storing it — useful when guests forget or your PMS loses the value.

How is the code computed?

HMAC-SHA-256 of the booking ID using your secret as the key, taken mod 10^digits.

Is my secret stored anywhere?

No. It only lives in your URL while you use the page. Treat it like a password.

Can I use 4-digit codes?

Yes. The tool supports 4-8 digit codes. Most smart locks accept 4-8.

If you're shopping
August Smart Lock

Consumer-friendly, retrofits most deadbolts, integrates with Hostfully + OwnerRez.

Check it out →
Affiliate disclosure: we may earn a commission on purchases. We only feature tools we'd point a friend to.
If you're shopping
Schlage Encode Plus

Commercial-grade keypad lock, Apple home key support.

Check it out →
Affiliate disclosure: we may earn a commission on purchases. We only feature tools we'd point a friend to.
If you're shopping
RemoteLock

Multi-platform lock management; works with most PMS systems.

Check it out →
Affiliate disclosure: we may earn a commission on purchases. We only feature tools we'd point a friend to.

More tools across the STR cluster

Built by The STR Ledger. Excel templates and PDFs for short-term rental finance.

Visit The STR Ledger