How to generate a random string
- 1Set the Length of each string and How many strings you want. Up to 1,000 strings of up to 4,096 characters are supported.
- 2Choose the Characters to draw from: A-Z, a-z, 0-9 and symbols. Leave letters and digits on for a random alphanumeric string, which works as a random number and letter generator.
- 3Add Extra characters if you need a custom alphabet, for example hex digits, or characters outside the standard sets. Tick Skip look-alike characters to remove 0, O, 1, l and I.
- 4Tick No repeated characters if each character may only be used once per string.
- 5Click Generate again to refresh the list, then Copy all, or copy a single string with the icon beside it.
How this random string generator works
A random string is a sequence of characters picked independently from a pool. This generator builds the pool from the options you tick, removes duplicates and look-alike characters if you ask, and then draws each position using the Web Crypto API. Picking an index uses rejection sampling, so every character in the pool is exactly equally likely and there is no modulo bias.
The strength of a string depends on two things: the size of the pool and the length. Each character adds log2(pool size) bits of entropy, so 16 characters from a 62-character pool of letters and digits give about 95 bits, plenty for identifiers and one-time codes. The panel shows the pool size and an entropy estimate as you change the settings. Turning on No repeated characters reduces the number of possible strings slightly, which is why it is off by default.
Use it as a random code generator for coupon codes, invite codes and order references, as a random characters generator for test data and fixtures, or as a random text generator for filler values. It is also fine for session IDs and API keys of reasonable length, though for those the dedicated Secret Key Generator offers standard encodings and presets, and the Password Generator is better for human-typed passwords.
Strings are created locally in your browser tab. They are not logged, uploaded or stored, and each click draws a completely fresh set.
When developers generate random strings
Test data and fixtures
Fill databases, forms and API tests with random alphanumeric strings of the right length and character set.
Codes and references
Create invite codes, coupon codes or order references, and skip look-alike characters so people can read them aloud.
Identifiers and tokens
Make short IDs, temporary tokens or salts when you don't need a standard format such as UUID.
Placeholders and puzzles
Generate filler text, captcha-style strings or random passphrase seeds in bulk.
Frequently asked questions
Is this random string generator secure?
+
It uses your browser's cryptographically secure random generator, the same one used for encryption keys, so the strings are unpredictable. For production secrets, prefer the Secret Key Generator for standard sizes and encodings.
How do I generate a random string with letters and numbers only?
+
Keep A-Z, a-z and 0-9 ticked and untick Symbols. That gives an alphanumeric string drawn from 62 characters.
Can I use my own set of characters?
+
Yes. Untick the standard sets and type your characters into Extra characters, for example 0123456789abcdef for hex or ACGT for DNA letters.
How many strings can I generate at once?
+
Up to 1,000 strings per click, each up to 4,096 characters long. Copy all copies them one per line.
Are the strings stored or sent anywhere?
+
No. They are generated locally in your browser and never uploaded.
Related tools
Password Generator
Create strong, secure passwords with customizable length and character sets.
Secret Key Generator
Generate cryptographically-secure keys and tokens for AES-128/192/256, HMAC, JWT, OAuth client secrets, session cookies, CSRF, and Django SECRET_KEY. Standard presets plus fully custom byte sizes — hex, Base64, Base64URL, Base58, or alphanumeric output. Bulk generation up to 100 at once.
UUID / GUID Generator
Generate cryptographically secure UUIDs (v4) in standard, hyphen-free, uppercase, or braced GUID formats. Bulk generation up to 1,000.
Random Number Generator
Pick random numbers between any minimum and maximum: one or many, with or without repeats, with decimals and sorting. Uses your browser's secure RNG.