Random Number Generator — Cryptographically Secure Integers
Generate cryptographically random integers — range, count, unique-only and decimal / binary / octal / hex output.
How to use
- 1 Set Min, Max and Count.
- 2 Optionally toggle Unique values to draw without replacement.
- 3 Pick a base (decimal / binary / octal / hex) and separator.
Why use this tool
- Cryptographically secure — uses Web Crypto, not Math.random().
- Unique mode is rejection-sampled — uniform across the range.
- Output in 4 bases — drop straight into your code.
- Pure client-side — your numbers never leave the browser.
Frequently asked questions
How are these random?
They come from <code class="font-mono text-xs">crypto.getRandomValues()</code> with unbiased uniform sampling — modulo-bias is rejected on the fly.
What is the maximum count?
Up to 10,000 numbers per click. Unique requires count ≤ range size.
Why are negative numbers allowed?
Min and Max are signed integers — you can use any whole-number range.
What is Random Number Generator?
A Random Number Generator is a tool that produces random integers in the browser using a cryptographically strong random source. It lets the user set a range and count, restrict results to unique values, and display output in decimal, binary, octal, or hexadecimal. All generation happens client-side with no signup or server involvement.
Features
Cryptographically strong randomness
Uses crypto.getRandomValues() to draw 64 bits per candidate and rejects values above the largest multiple of the range, avoiding the modulo bias that a naive Math.random() * range approach would introduce.
Decimal, binary, octal, or hex output
Each generated integer can be formatted as base 10, base 2 (0b prefix), base 8 (0o prefix), or base 16 (0x prefix, uppercase digits).
Unique-only mode
Prevents duplicate values in the output. Ranges up to 100,000 use an in-memory Fisher-Yates shuffle; larger ranges fall back to reservoir sampling with a Set until the requested count of distinct values is collected.
Configurable count and separator
Generates from 1 up to 10,000 numbers per run, joined by a newline, comma, or space, ready to copy directly from the output box.
Example
Input
min=1, max=100, count=10, unique=true, base=10, separator=comma
Output
7, 42, 88, 15, 63, 29, 91, 3, 56, 74 (10 unique integers between 1 and 100, comma-separated)
Common use cases
-
1
Raffle and giveaway draws
Generate a unique set of winning ticket numbers within a known range without repeats.
-
2
Sampling and test data
Produce batches of random integers in decimal or hex for seeding test fixtures, load-testing IDs, or statistical sampling.
-
3
Games and tabletop tools
Roll ranges (e.g. 1-6, 1-20) repeatedly or draw a fixed count of non-repeating numbers for lottery-style games.
Generates random integers in a user-set [min, max] range using the browser's Web Crypto API (crypto.getRandomValues) with rejection sampling for unbiased uniform output, rather than Math.random(). It supports up to 10,000 values per run, an optional unique-only mode (Fisher-Yates shuffle for ranges up to 100,000, reservoir sampling via Set for larger ranges), and decimal, binary, octal, or hexadecimal formatting. Everything runs client-side in JavaScript — no numbers are sent to a server.
- Category
- Creator
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
References
- Crypto: getRandomValues() method — MDN Web Docs
- Web Crypto API — MDN Web Docs
- BigInt — MDN Web Docs
Privacy
Your data never leaves your browser unless explicitly stated. Random Number Generator runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
YouTube Thumbnail Downloader
Download YouTube thumbnails in all available resolutions. Just paste a video URL.
Open toolOpen Graph Preview
Test how your URL appears when shared on social media. Preview Facebook, Twitter, LinkedIn, and Slack cards.
Open toolWord & Character Counter
Count words, characters, sentences, and paragraphs. Reading time, speaking time, and top keywords — instant.
Open toolLorem Ipsum Generator
Generate Lorem Ipsum placeholder text — by paragraphs, sentences, or words. Optional HTML wrapping.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.