Random tokens, codes and PINs in bulk
- Free
- No sign-up
- No upload
- Works offline
Tool facts
- Saves as
TXTCSV- Price
- Free, no sign-up, no watermark
- Are files uploaded?
- No. Everything is processed in this browser, on your device.
- Offline use
- Works without a connection once this page has loaded
- Built with
- Web Crypto
- Browser
- A recent Chrome, Edge, Firefox or Safari, on computer or phone.
- Limits
- Up to 10,000 strings per batch, each with 1 to 256 random characters (PINs 4 to 12 digits).
Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.
About Random String Generator
Random String Generator makes batches of random tokens, invite and coupon codes, licence keys, API-key-style strings and PINs. Pick a character set (letters and digits, lowercase or uppercase with digits, hex, Bitcoin Base58, Crockford Base32, URL-safe, digits only, or characters you type yourself), a length of 1 to 256 random characters and up to 10,000 strings at once. Codes can be split into groups such as K7QF-2MXD-9PRA, wrapped in a prefix like sk_live_ or inv_, kept free of duplicates, cleared of look-alike characters and forced to start with a letter.
Every character comes from crypto.getRandomValues with rejection sampling, so in a 58-character set each character has exactly the same chance. The Strength panel shows bits per character and per string and the chance that the batch contains a repeat: 10,000 Base58 codes of 16 characters have about a 3 × 10⁻²¹ chance. PIN mode (4 to 12 digits) can skip weak PINs such as 1111, 1234, 1212, years, dates and the 20 most common PINs from the DataGenetics 2012 study, and shows how many it excluded. For account passwords, use the Password Generator instead.
Random String Generator runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.
How to use Random String Generator
- Pick a Character set, or choose Custom and type the characters you want to allow.
- Set the Length (random characters only) and How many to generate, up to 10,000.
- Optionally choose Grouping and a separator, add a Prefix or Suffix, and switch on Unique, Exclude look-alikes, Start with a letter or, for PINs, Avoid weak PINs.
- Read the Strength panel to check the bits per string and the chance of a repeat.
- Click a line to copy it, or use Copy all, Download TXT or Download CSV; Regenerate draws a fresh batch.
Frequently asked questions
When should I use this instead of the Password Generator?
Use this tool for codes that a program or a person types in once: invite and referral codes, coupon and licence keys, API tokens, test IDs and PINs. It is built for batches, readable alphabets like Base58 and Crockford, grouping, prefixes and uniqueness. For a password you log in with, use the Password Generator, which mixes in symbols, can require every character class and rates the result against password cracking.
How long should a token or code be?
Look at bits per string in the Strength panel. Codes that are checked online with rate limiting, such as invite or coupon codes, are hard to guess from about 40 to 64 bits; 10 Crockford characters give 50 bits. Secrets that could be attacked offline or that never expire, such as API keys and password-reset tokens, should have 128 bits or more: 22 Base58 characters (128.9 bits), 32 hex characters (128 bits) or 22 URL-safe characters (132 bits).
What does the chance of a repeat mean, and what does Unique do?
It is the birthday-problem probability that at least two strings in the batch are identical when every string is drawn independently. For small spaces it is computed exactly; for large ones from 1 − exp(−n(n−1)/2N). With Unique on, a string that already appeared is thrown away and drawn again, so every line differs. If you ask for more unique strings than the settings allow, for example 10,000 unique 4-digit PINs with weak PINs excluded (only 9,137 exist), the tool says so instead of generating.
Which PINs count as weak?
With Avoid weak PINs on, the tool rejects PINs made of one digit (1111), straight runs up or down (1234, 9876, 0123, no wrapping), a repeated block (1212, 123123) and, for 4 digits only, years 1900 to 2099, dates written MMDD or DDMM, and the DataGenetics 2012 top 20. That excludes 863 of the 10,000 four-digit PINs, 22 five-digit and 1,100 six-digit ones. Rejected PINs are redrawn, so every remaining PIN is equally likely.
Are the strings sent anywhere, and are they really random?
No, they are generated in your browser and nothing is uploaded or stored. The randomness comes from crypto.getRandomValues, the browser's cryptographically secure generator. Each random 32-bit value is mapped to a character only if it falls below the largest multiple of the alphabet size; otherwise it is discarded, which removes the modulo bias a plain remainder would add for sizes like 58 or 10.