Random Number Generator: Secure Integers & High-Precision Decimals
This page provides two professional-grade random number generators. The first creates a single random integer between any two bounds, even when the numbers span thousands of digits. The second is a comprehensive tool that can produce one or many random values—either integers or decimals—with a decimal precision that you can set up to 999 digits. Everything runs locally in your browser using the Web Crypto API for high-quality randomness.
How it works (high level)
- Cryptographically secure randomness: values are generated with
crypto.getRandomValues(). - Uniform distribution in ranges: a rejection-sampling method ensures equal probability across your range.
- Big integers & scaling: for decimals, numbers are scaled to integers by 10^precision, generated uniformly, then scaled back.
Tips
- For very large integers, enter bounds as full digit strings (no commas or spaces).
- For decimals, set Precision to the number of digits after the decimal point you require.
- Use the Copy or Download buttons to save results.
Note: Extremely huge ranges (millions of digits) may be limited by device memory and browser constraints.