Random Twitter Winner Generator
Pick random Twitter/X giveaway winners fairly using cryptographically secure randomness. Paste usernames, set winner count, and draw instantly.
About
Running a Twitter/X giveaway without a verifiably fair selection method exposes you to accusations of bias and potential platform policy violations. This tool uses the browser's native crypto.getRandomValues API - the same cryptographic primitive underlying TLS and password generation - to select winners from your participant list. Every draw produces a statistically uniform distribution across all n entries, meaning each participant's probability of selection equals exactly 1n. The tool auto-deduplicates entries, strips formatting artifacts, and validates Twitter handle syntax against the platform's 15-character alphanumeric constraint.
Limitations: this tool cannot verify that accounts are real, active, or followed your rules (retweet, follow, etc.). You must audit winner accounts manually. The draw history is stored locally in your browser for audit purposes but is not externally verifiable - for high-stakes giveaways (prizes above $500), consider screen-recording the draw process. Pro tip: always announce the exact number of entries and winners before drawing to establish transparency.
Formulas
Winner selection uses the Fisher-Yates (Knuth) shuffle algorithm with cryptographically secure random indices. For an array of n participants, the algorithm iterates from index n โ 1 down to 1, swapping each element with a uniformly random element from the unprocessed portion:
j โ secureRandom(0, i)
swap arr[i] with arr[j]
The first k elements of the shuffled array become the winners, where k is the desired winner count. The probability that any specific participant wins is:
Secure random integer generation avoids modulo bias by using rejection sampling. A random 32-bit unsigned integer r from crypto.getRandomValues is accepted only if r < limit, where limit = 232 โ (232 mod range). This guarantees uniform distribution across the target range.
Where: n = total unique participants, k = number of winners to draw, j = cryptographically random index in range [0, i], P(win) = probability of any single entry winning.
Reference Data
| Platform | Handle Format | Max Length | Allowed Characters | Case Sensitive |
|---|---|---|---|---|
| Twitter/X | @username | 15 chars | A - Z, 0-9, underscore | No |
| @username | 30 chars | A - Z, 0-9, period, underscore | No | |
| TikTok | @username | 24 chars | A - Z, 0-9, period, underscore | No |
| YouTube | @handle | 30 chars | A - Z, 0-9, hyphen, underscore, period | No |
| Discord | username#0000 | 32 chars | A - Z, 0-9, period, underscore | Yes |
| Giveaway Size | Entries | Recommended Winners | Collision Risk (same person) | Draw Time |
|---|---|---|---|---|
| Micro | 10 - 50 | 1 - 3 | None (deduplicated) | < 1ms |
| Small | 50 - 500 | 1 - 5 | None | < 1ms |
| Medium | 500 - 5,000 | 1 - 10 | None | < 5ms |
| Large | 5,000 - 20,000 | 1 - 20 | None | < 10ms |
| Mega | 20,000 - 50,000 | 1 - 50 | None | < 50ms |
| RNG Method | Entropy Source | Bias | Suitable for Giveaways | Standard |
|---|---|---|---|---|
| Math.random | PRNG (xorshift128+) | Detectable modulo bias | No | None |
| crypto.getRandomValues | OS entropy pool | Negligible (< 2โ128) | Yes | W3C Web Crypto |
| Hardware RNG | Thermal noise / quantum | None measurable | Yes | NIST SP 800-90B |
| Atmospheric noise | Radio static | None measurable | Yes | random.org |