About Backup Codes Generator
Make a set of backup codes for an account, a password manager vault or a system you run: the kind of one-time recovery codes people print and keep in a drawer for the day they lose their phone. Choose digits, letters and digits, or hexadecimal, the length, and how each code is split into groups so it is easy to read aloud or type.
Every code is drawn with your browser’s cryptographic random generator, no code repeats within a set, and the letters leave out characters that are easy to confuse on paper. Download the set as a text file to print. Nothing is sent or stored.
How it works
- Each character is chosen with crypto.getRandomValues and rejection sampling, so every symbol of the chosen set is exactly equally likely.
- A set is built one code at a time. If a code comes up that is already in the set, it is drawn again, so all the codes you get are different.
- Letters and digits use 31 symbols: the lower-case alphabet and the digits 2 to 9, without 0, 1, i, l and o. A 10-character code then holds about 50 bits; 10 digits hold about 33.
- Grouping only adds separators for readability. If you build a system that accepts these codes, strip the separators and compare the rest.
Questions
How long should backup codes be?
If the service limits failed attempts, 8 to 10 digits are plenty: guessing even one code out of ten would take millions of tries. If an attacker could test codes offline, against a stolen database for example, use letters and digits at 12 characters or more, and store only hashes of the codes.
Can I use these codes for my Google or GitHub account?
No. Those services generate their own codes and only accept the ones they issued. This tool is for systems where you set the codes: an app you build, a shared account policy, a vault’s emergency kit, or a printed list for a team.
How many codes can I make at once?
Up to 100 per set, all different from each other. Ten is the usual number for an account.
Are the codes stored anywhere?
No. They exist only on this page until you copy or download them or close the tab. Treat the printed list like a password: anyone holding it can use the codes.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.