Secure Random Generator
Cryptographically secure random generator using the browser's crypto.getRandomValues(). Produces random integers, floats, UUID v4 values and random strings with a configurable character set and length, all generated locally.
FreeOnline Tool
Loading…
How to Use
- Choose the type of value you need (integer, float, UUID, random string and so on).
- Set the parameters such as range, length and character set.
- Click Generate to produce the result.
- Click copy to put the result on your clipboard.
- Click refresh to generate a new value.
Features
- Uses the browser's crypto.getRandomValues() cryptographically secure pseudo-random number generator (CSPRNG)
- Supports random integers, floats, UUID v4 and random strings
- Character set (letters, digits, symbols) and length are configurable
- Can generate several values at once
- Generated locally, with results never uploaded to a server
Use Cases
Creating secure passwords and tokens
Generate high-strength passwords, API tokens and session secrets where unpredictability of the credential matters.
Producing UUID primary keys
Create UUID v4 identifiers for database records, which suits distributed systems that have no central ID service.
Randomising test data
Generate random user IDs, phone numbers and email addresses for automated tests instead of hard-coding values that interfere with each other.
Generating keys and salts
Produce AES keys, HMAC keys and hash salts, all of which depend on high-quality randomness.
FAQ
How does a cryptographically secure random number differ from an ordinary one?
Ordinary randomness such as Math.random() comes from a pseudo-random algorithm that can be predicted. A cryptographically secure generator draws on the operating system's entropy sources, making its output unpredictable and suitable for passwords, tokens and keys.
What format is UUID v4?
UUID v4 is a 128-bit random identifier written as xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, 36 characters including hyphens. Collisions are vanishingly unlikely, which is why it is common for database primary keys and distributed IDs.
Can I control which characters appear in a random string?
Yes. You can select the character set, combining letters, digits and symbols, and set the length, so the output matches whatever format your target system requires.
Are the generated values sent anywhere?
No. Everything is generated locally in the browser and nothing is transmitted, so values are safe to use as real secrets.