Random String Generator
Produce random tokens, IDs and test strings from the character set you need.
Processed locally in your browser/ Your data stays in your browser.
What is Random String Generator?
A random string is a sequence of characters picked independently and uniformly from an alphabet. It is the standard shape of API keys, session identifiers, invite codes, coupon codes and test fixtures. Quality depends on two things: a cryptographic random source and unbiased selection.
This tool draws each character with crypto.getRandomValues and rejection sampling. Pick a preset (alphanumeric, letters, digits, lowercase hex, Base64url) or supply your own characters, set the length (up to 4,096) and how many strings to create, and see the entropy per string.
How does it work?
- Choose a character set, or select "Custom" and type the exact characters allowed.
- Set the length and the number of strings.
- Press Generate and copy the result, one string per line.
Common use cases
- Generating API keys, invite codes or one-time tokens for a prototype.
- Creating unique file names or database test keys.
- Building coupon codes from an alphabet without look-alike characters.
- Filling forms and fixtures with realistic random text.
Examples
Produce random tokens, IDs and test strings from the character set you need.
Privacy
Random String Generator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Strings are generated locally and shown on screen; treat them like any secret you copy. For passwords with mixed-set guarantees use the Password Generator, and for UUIDs use a UUID tool.
Frequently asked questions
How long should a token be?
For unguessable tokens aim for at least 128 bits of entropy: 22 characters of Base64url, 32 hex characters or 22 alphanumeric characters.
What does Base64url mean here?
The URL-safe alphabet A–Z, a–z, 0–9, "-" and "_". Strings from it can be used in URLs and file names without escaping.
Are duplicate characters allowed inside a string?
Yes. Each position is drawn independently, as in real tokens. Custom character sets are de-duplicated so each character is equally likely.
Related tools
Password Generator
Create strong, truly random passwords with the character sets you choose. Nothing is sent or saved.
Developer Tools
Random Bytes Generator
Get raw random bytes from the browser’s secure generator, formatted the way your code expects.
Developer Tools
UUID Generator
Create one or thousands of universally unique identifiers in any version, formatted exactly the way your code or database expects.
Developer Tools
Random Number Generator
Pick random numbers in a range you define: integers of any size, decimals, and no-repeat draws.
Developer Tools
Base64URL Encoder
Turn any text into a Base64URL string that can be pasted straight into a URL, a filename or a JWT segment.
Encoding & Decoding
SHA-256 Hash Generator
Hash any text with SHA-256 and get the 256-bit digest as hex or Base64 in real time.
Hash & Checksum
Random Hex Generator
Create random hex values of any length, formatted as a key, a nonce, a colour-style code or a byte array.
Developer Tools