data tool
Access code generator
Set a length, pick the characters, and get one access code or a batch of 500, each drawn from the browser's cryptographic random source with no character favoured over another. Use them to protect a document sent for signature, a door, an event check in or a one time voucher.
Loading the tool…
- Runs on your device, nothing is uploaded
- Free, no sign in
- No watermark, no file limit
How it works
- 1
Set the length
Eight characters is the default. Four is the shortest accepted, because that is the minimum an e-sign access code takes.
- 2
Choose the characters
Tick digits, capitals, lower case or symbols. Leave out characters that look alike is on by default, so 0 and O, or 1, l and I, are never confused when a code is read out.
- 3
Say how many
One for a single envelope, or up to 500 for a guest list. Split with a hyphen every 4 characters if people will type the codes from paper.
- 4
Copy them out
Copy all or Download .txt before you leave the page. Generate makes a fresh batch.
How strong a code needs to be
Strength is the number of possible codes, and it grows fast with length. Four digits give 10,000 possibilities; eight characters from the default set of 32 digits and capitals give about 1.1 million million, or 40 bits. What makes a short code acceptable is a limit on guessing. An e-sign recipient protected by an access code is locked for 15 minutes after 5 wrong attempts, which caps an attacker at 480 guesses a day. At that rate a 4 digit code can be worked through well inside the 30 days an envelope stays open, while an 8 character code would take millions of years. The tool prints the bits and the odds of one guess for every setting, so the choice is visible.
Using a code on a document sent for signature
When an envelope recipient is set to Access code, the signer has to enter the code before the document opens, on top of the emailed link. The code needs at least 4 characters, the sender shares it out of band, and the system keeps only a salted hash, so nobody can look it up later. That last point is why the code should go by a different route from the email: a text message, a phone call, or a note at the start of a meeting. Sending it in the same inbox as the signing link adds little, because whoever can read one can read the other.
Codes that people read and type
A code copied by hand fails for human reasons more often than for mathematical ones. Removing 0, O, o, 1, l and I avoids the most common misreadings, at a small cost in strength that a longer code recovers. Capitals and digits are easier to read aloud than mixed case. Symbols add strength per character but are hard on a phone keyboard, so save them for codes that are pasted, not typed. A hyphen every 4 characters makes a long code easy to check, but it becomes part of the code: a signer must type it exactly as sent.
Limits worth knowing
Each character is drawn by rejection sampling: a random byte that would favour some characters over others is thrown away and redrawn, so every character in the set is equally likely. Codes are kept unique within a batch, and a batch drawn from a small pool of possible codes carries a note saying so. Nothing is uploaded and nothing is stored, ever. That protects the codes, and it also means the tool cannot recover a batch you did not save.
Limits
- Codes are generated in your browser and never stored. Close or refresh the tab and they are gone, so copy or download them first.
- Codes are unique within one batch only. Two batches can, very rarely, share a code.
- Short codes from few characters make a small pool. 500 codes of 4 digits with look alikes removed come from only 4,096 possible ones, and the tool flags it.
What it does not do
- It does not send codes to anyone. You share each code yourself, by a different route from the link it protects.
- It does not keep a list of issued codes or check one against another system.
- It does not make codes that expire; expiry belongs to the system that checks them.
Questions people ask
How long should a door or alarm code be?
Most keypads take 4 to 8 digits. Use the longest your keypad allows, and turn on its lockout after wrong attempts if it has one, since that limit does more than length. Avoid codes made from dates, repeated digits or straight runs such as 1234. Change shared codes whenever someone who knew one leaves.
Can I make a batch of voucher or ticket codes for an event?
Yes. Set the count to the number of guests, use capitals and digits with look alikes removed, and a length of 8 or more. Every code in the batch is different. Download the .txt and import it into the list you check at the door, since this page keeps no record of which codes it made.
Is an access code the same as a one time code?
No. An access code is chosen by the sender and shared in advance, so it stays the same until the envelope ends. A one time code is generated at the moment of signing and emailed to the signer: in the e-sign product it is 6 digits, expires in 10 minutes and works once. This tool makes the first kind.
Why not just use Math.random to make codes?
Math.random is built for speed in games and animation, not for secrets, and its output can be predicted from earlier values in some engines. crypto.getRandomValues draws from the operating system's secure random source, the one used for encryption keys. The tool also corrects for modulo bias, which a quick home made generator usually gets wrong.
Does the page keep a copy of my codes?
No. The codes are made and shown in this page only; no network request carries them and nothing is written to the browser's storage. That is why the page warns you to copy or download them before closing the tab. Check it yourself in the network panel of your browser's developer tools.
Protect a signing link with an access code
Take what you made here into e-signatures.
Send a document for signingMore tools like this
- UUID generatorA UUID generator for version 4 random ids and version 7 time ordered ids, up to 1,000 at once, made with the browser's crypto source. Copy all or download.
- Business days calculatorCount business days between two dates or add working days to find a deadline. Skips weekends and the holidays you paste in. Free, instant, nothing to upload.
- Sign a PDFDraw, type or photograph your signature, place it on any page and download the signed file. Runs in your browser. A drawn mark, not a certificate.
- QR code generatorMake a QR code for a link, WiFi network, contact card, SMS or location. It redraws as you type and tells you how large to print it. Nothing is uploaded.
Background reading: the question page on this.
Written and checked by the OneCraft team. Last checked .