Random String Generator
Generate random strings
Generate random strings Runs locally in your browser
Length of the string, up to 1000 characters.
About the
The Random String Generator produces a string of letters and digits at whatever length you ask for, up to a thousand characters. Use it when you need a throwaway identifier, a test value or a short code and do not want to make one up by hand, because made-up strings tend to repeat. Be aware of what it is not: the values come from the browser's ordinary random function, so they are fine for test data and short-lived codes and not for anything secret.
Where people use the
- Generating a test identifier for a fixture or a seed script.
- Creating a short code for a demo or a prototype.
- Producing filler data that is obviously not real.
- Making a unique suffix for a file name in a batch job.
How to use the
- 1
Enter a length
Type the number of characters you want. Anything up to a thousand is accepted.
- 2
Generate
A string of that length is produced from upper and lower case letters plus digits.
- 3
Copy it
Use the copy button and paste it where you need it.
- 4
Generate again for another value
Each run is independent, so a new string is produced every time.
Tips and best practices
- Use the Password Generator instead if the value needs to be secret.
- Longer strings make collisions vanishingly unlikely; sixteen characters is plenty for test data.
- Check for duplicates yourself if uniqueness actually matters.
Frequently asked questions
Is it suitable for passwords or tokens?
No. It uses the ordinary random function rather than a cryptographically secure one, so it must not be used where someone could profit from predicting the value. Use the Password Generator for anything secret.
Which characters are used?
Upper case letters, lower case letters and the digits 0 to 9: sixty-two possibilities per character. Symbols are not included.
Can two runs produce the same string?
Yes, in principle. With a long enough string the chance is negligible, but it is not zero, so check for duplicates if uniqueness matters.
Why is there no option to exclude look-alike characters?
Because the character set is fixed. If you need to avoid 1, l, I and 0, generate a string and replace those characters yourself.
Is the string uploaded or stored?
No. It is generated in your browser and forgotten when you leave the page.