Random Number & String Generator
Generate cryptographically secure random numbers, strings, passwords and UUIDs.
About the Random Number & String Generator
What does this tool do?
This is a free generator for three kinds of random data: numbers (whole or decimal, within any range you set), strings (any length, built from the character sets you choose), and UUIDs (version 4). Pick a type, set a few options, and it spits out as many values as you need, ready to copy or download as a .txt, .csv, or .json file.
The part that matters most is how the randomness is made. We use the browser's Web Crypto API (crypto.getRandomValues), the same cryptographically secure source recommended for passwords and tokens, and we draw from it without the modulo bias that trips up a lot of quick-and-dirty generators. So the strings you make here are genuinely safe to use as passwords, API keys, or session IDs, not just throwaway sample data. And because it all runs in your browser, nothing you generate is ever sent to us.
How to Use This Tool
- Choose what to generate. Use the tabs to switch between Strings, Numbers, and UUID. The options panel changes to match.
- Set your options. For strings, tick the character sets (or hit a preset like Password or PIN) and set the length; for numbers, set the range, decimals, and whether values must be unique; for UUIDs, choose case, hyphens, and braces.
- Pick a quantity and separator. Decide how many values you want (up to 100,000) and how they should be split apart, whether that's one per line, comma-separated, or your own custom separator.
- Generate and grab the result. Hit Generate, then copy the output or download it as TXT, CSV, or JSON. Want to come back to the exact same setup later? Copy config link gives you a URL that restores every setting.
Common Use Cases
Random data shows up everywhere in development and testing. People reach for this tool to:
- Create strong passwords: The password presets mix all four character sets and can drop confusing look-alikes, and the strength meter shows the entropy so you know how tough a password really is.
- Seed a database with test data: Generate a few thousand IDs, usernames, or order numbers and paste them straight into a SQL script or spreadsheet.
- Produce UUIDs in bulk: Need 500 version-4 UUIDs for fixtures or message keys? Switch to the UUID tab and download them as JSON.
- Pick winners or samples: Generate unique numbers in a range to draw raffle entries or pull a random sample of row IDs.
- Build API keys and tokens: The hex-token and alphanumeric presets give you the kind of opaque, high-entropy strings that work well as keys.
- Mock up forms and APIs: Quickly fabricate realistic-looking codes, reference numbers, or coupon strings with a prefix and suffix.
If you need a specific format, we have dedicated tools too — like the Random Hex Generator, Random IP Generator, and Random Date Generator.
Frequently Asked Questions
Are these values secure enough for passwords?
Yes. The generator draws from crypto.getRandomValues, the browser's cryptographically secure random source, and it picks characters using rejection sampling so every character is equally likely (no modulo bias). That makes the passwords and tokens it produces suitable for real use. As always, use a long string and a wide character set, and store the result somewhere safe like a password manager.
Isn't this just using Math.random() under the hood?
No, and that's the point. Math.random() is fast but not cryptographically secure: its output can be predicted and it should never back a password. This tool uses the Web Crypto API instead. If your browser somehow lacks it (extremely rare today), the tool will fall back to Math.random() rather than break, but every current browser supports the secure path.
What kind of UUID does it generate?
Version 4 UUIDs — the random kind. Each one packs 122 bits of randomness with the version and variant bits set per the spec, so collisions are astronomically unlikely. You can toggle uppercase, hyphens, and curly braces to match whatever format your code or database expects.
What does "exclude look-alikes" do?
It removes characters that are easy to confuse when read by a person — the digit 0 and capital O, the digit 1 and lowercase l and capital I. It's handy for codes someone will type by hand or read off a screen, like a voucher or a temporary PIN, where a misread character means a failed entry.
How does "unique values only" work, and are there limits?
For whole numbers, the tool guarantees no repeats by shuffling the range, so it's exact. It can only give you as many unique values as the range actually holds — ask for 100 unique numbers between 1 and 50 and it will tell you that's impossible. For decimals, uniqueness is checked at the precision you set. Quantity is capped at 100,000 values and string length at 2,048 characters to keep your browser responsive.
Can I save or share my settings?
Yes. Hit Copy config link and you'll get a URL with your type, quantity, character sets, and every other option baked in. Bookmark it or send it to a teammate, and opening it rebuilds the exact generator setup (the random output itself is fresh each time, as it should be).
Is any of my data sent to a server?
No. Every value is generated locally in your browser with JavaScript. Your settings and the output never leave your device, and the tool keeps working even if you go offline after the page has loaded.