About the Random String Generator
This generator produces random strings from a selectable character set: alphanumeric, letters only, digits only, hexadecimal, Base64, or all printable characters. It uses the browser's secure random source, so the output is suitable for tokens, test data, temporary identifiers and salts. Generate one or many at any length up to 1024 characters.
The sets behave exactly as labelled: hex is 0-9 and a-f, Base64 is the standard 64-character alphabet including plus and slash, and "all printable" adds punctuation such as brackets, ampersands and question marks. Two things catch people out. A string built from the Base64 charset is not encoded Base64, it is only random characters borrowed from that alphabet, so decoding it produces nonsense. And a printable or Base64 string can contain a slash, a plus or an ampersand, all of which need escaping before the value goes into a URL, a shell command or an unquoted config line; stick to the alphanumeric set for anything that travels through a query string.
A realistic use is stress-testing validation: generate two hundred strings at 255 characters and see whether your form, your column definition and your logging all cope with the maximum length. For specific formats there are dedicated tools: UUID for standard identifiers, Random Hex for byte strings, Password Generator for passwords with guaranteed character variety, and API Key Generator for prefixed keys. This tool is the flexible catch-all.
How to use
- Set the length, count and character set.
- Copy or download the strings.
- Use a specific tool for UUIDs, passwords or hex if that fits better.
Common questions
- Is the randomness secure?
- Yes, it uses the browser's cryptographic random source, suitable for tokens and salts.
- Can I generate a random hex string?
- Choose the hex charset, or use the dedicated Random Hex Generator for byte-based lengths.
- What is the maximum length?
- 1024 characters per string.