A free, quantum-based true random number generator powered by the Emotion and Motivation Lab at LMU Munich. Generate cryptographically secure random numbers for research, development, and cryptography.
What is a True Random Number Generator?
A true random number generator (tRNG) is a device that generates random numbers from a physical process, rather than a computer algorithm. Unlike pseudo-random number generators (pRNGs), which use mathematical formulas to simulate randomness, tRNGs extract entropy from physical phenomena that are fundamentally unpredictable.
The Quantis tRNG used in this web application generates random numbers based on the quantum properties of light. At the quantum level, the behavior of individual photons is governed by Heisenberg's uncertainty principle, meaning that even with perfect knowledge of all variables, the outcome remains fundamentally unpredictable. This makes the numbers generated truly random and cryptographically secure.
tRNG vs pRNG: Understanding the Difference
Many applications use pseudo-random number generators (pRNGs) like Math.random() or /dev/urandom. While pRNGs are fast and sufficient for many use cases (simulations, games, non-critical applications), they have fundamental limitations:
| Property | pRNG (pseudo) | tRNG (true) |
|---|---|---|
| Entropy Source | Algorithm (deterministic) | Physical process (quantum) |
| Predictability | Deterministic with seed | Fundamentally unpredictable |
| Security | Pseudo-random (can be cracked) | Cryptographically secure |
| Reproducibility | Yes (with same seed) | No |
| Speed | Very fast | Hardware-dependent (~100ms) |
| Best Use Cases | Simulations, games, testing | Cryptography, research, gambling |
When to use pRNG: Simulations, Monte Carlo methods (where reproducibility is needed), video games, procedural generation, non-security-critical randomness.
When to use tRNG: Cryptographic key generation, scientific experiments requiring unbiased randomness, online gambling (regulatory requirements), security tokens, and any application where predictability could be exploited.
Applications of True Random Number Generators
A) Cryptography & Security
tRNGs are essential for cryptographic applications where predictability can compromise entire systems. Common use cases include:
- Key Generation: AES, RSA, elliptic curve cryptography keys
- Nonces & IVs: Initialization vectors for encryption algorithms
- Salts: For secure password hashing (bcrypt, Argon2)
- Token Generation: Session IDs, CSRF tokens, API keys, authentication tokens
Why tRNG is critical here: pRNG vulnerabilities have led to real-world security breaches. In 2008, a weakness in Debian's OpenSSL pRNG allowed attackers to predict SSH keys. For production cryptography, true entropy is non-negotiable.
B) Scientific Research
True randomness is crucial for unbiased scientific experiments. Trng.info was specifically designed for research use cases:
Psychological Experiments
- Randomization of participants: Assign subjects to experimental groups without bias
- Counterbalancing: Randomize order of tasks/stimuli to control for order effects
- Double-blind studies: Random placebo assignment eliminates experimenter bias
- Stimulus selection: Random presentation of images, words, or other stimuli
Statistical Methods
- Monte Carlo simulations: When reproducibility is not needed
- Bootstrap methods: Resampling with true randomness
- Permutation tests: Non-parametric hypothesis testing
- Bayesian MCMC: Markov Chain Monte Carlo sampling
Other Research Applications
- A/B Testing: Marketing and UX research
- Clinical Trials: Randomized controlled groups
- Survey Research: Random sampling of respondents
- Quality Control: Random inspection sampling
C) Gaming & Gambling
Online gambling and gaming platforms often require provably fair randomness for regulatory compliance. TRNGs provide:
- Online lotteries: Government-regulated random draws
- Casino games: Dice rolls, card shuffling, roulette
- Game mechanics: Loot drops, critical hits, procedural generation
- Fair play: Prevents exploitation of predictable pRNGs
D) Additional Applications
- Password Generation: Secure random passwords
- Art & Music: Generative art, algorithmic composition
- Decision Making: Fair lottery systems, random selection processes
- Software Testing: Fuzz testing, randomized stress tests
Why Choose trng.info?
Open Science & Transparency
- Free access for research, education, and development
- No registration required for web interface
- Academically operated by LMU Munich
- Transparent methodology (Quantis hardware documented)
- Open science principles supporting reproducible research
Technical Advantages
- Quantum-based entropy (not simulated or algorithmic)
- Fast response times (<100ms typical)
- Simple REST API with JSON responses
- Dual access: Browser UI and programmatic API
- Multiple data types: int, float, bytes, boolean, arrays
Trust & Reliability
- Academic institution: LMU Munich Emotion and Motivation Lab
- Privacy-focused: No data collection or tracking
- Research-grade: Used in scientific studies
- Established hardware: ID Quantique Quantis passes NIST/DIEHARD statistical tests
Comparison to Alternatives
| Service | Entropy Source | API | Free | Academic |
|---|---|---|---|---|
| trng.info | Quantum (photons) | Yes | Yes | Yes |
| random.org | Atmospheric noise | Yes | Limited | No |
| Math.random() | pRNG (algorithm) | No | Yes | No |
| /dev/urandom | OS entropy pool | No | Yes | No |
Frequently Asked Questions
Is trng.info really free?
Yes! The web interface is completely free with no limits. The API has a rate limit of 50 requests/minute without registration. For research projects requiring higher limits, you can request a free API key.
How is this different from Math.random() or /dev/urandom?
Math.random() uses a pseudo-random number generator (pRNG) that is deterministic — given the same seed, it produces the same sequence. /dev/urandom uses operating system entropy, which is often good but not guaranteed to be quantum-based. Trng.info uses quantum physical processes (photon behavior) that are fundamentally unpredictable according to quantum mechanics.
Can I use the generated numbers for cryptography?
Yes! The Quantis hardware meets cryptographic standards. However, for production cryptographic systems, ensure you:
- Fetch numbers over HTTPS (secure connection)
- Do not transmit sensitive keys over insecure channels
- Consider using the API to seed your local CSPRNG rather than fetching keys directly
What are the API rate limits?
The public API at api.trng.info allows 50 requests/minute without an API key. For higher limits, contact us to request a free API key. See the API documentation for details.
Do you store or log the generated numbers?
No. We do not store generated random numbers or request data (beyond minimal server logs for maintenance purposes). Your random numbers are private.
Can I use this for commercial applications?
For small-scale commercial use: yes. For high-frequency or large-scale commercial applications, please contact us to discuss a licensing agreement.
How do I cite trng.info in scientific publications?
See the Citation section below for recommended formats (APA, BibTeX).
What happens if the Quantis hardware fails?
If the hardware is unavailable, the API returns an HTTP 500 error. We monitor the system and resolve issues as quickly as possible. For critical applications, implement fallback error handling in your code.
Can I reproduce the random numbers (for scientific reproducibility)?
No — by definition, tRNG numbers are not reproducible. For reproducible research, you should:
- Save the generated numbers along with your experimental data
- Log request timestamps for audit trails
- Consider using a pRNG with a fixed seed for reproducible simulations
Citation & Academic Use
Recommended Citation Format
APA Style:
trng.info - True Random Number Generator. (2026).
Emotion and Motivation Lab, LMU Munich.
Retrieved from https://trng.info
BibTeX:
@misc{tRNG2026,
title = {trng.info -- True Random Number Generator},
author = {{Emotion and Motivation Lab}},
year = {2026},
url = {https://trng.info},
organization = {Ludwig-Maximilians-Universität München}
}
Best Practices for Scientific Use
- Document your randomization: Save generated numbers with your experimental data
- Log timestamps: Record when numbers were generated for audit trails
- Methods section: Mention "Randomization performed using quantum-based tRNG (trng.info)"
- Reproducibility: Since tRNGs are non-reproducible, archive the actual random numbers used
Notify Us (Optional)
If you use trng.info in published research, we'd appreciate a brief email (see contact). This helps us document usage and justify continued support. It's not required, but much appreciated!
Technical Details
Hardware
- Device: ID Quantique Quantis QRNG
- Entropy Source: Quantum photon emission and detection
- Certification: Passes NIST Statistical Test Suite and DIEHARD tests
- Reference: Turiel et al. (2007). JSTOR Article
API
trng.info provides a free REST API for developers and researchers. See the full API documentation for endpoints, parameters, response formats, and code examples.
Contact & Support
Get in Touch
For questions, API key requests, bug reports, or research collaborations, please contact us at info@trng.info.
Resources
Feedback Welcome
We value user feedback! If you have suggestions for improvements, feature requests, or want to collaborate on research projects, please reach out. trng.info is an open science project, and we're happy to support research and education.
Ready to Generate Random Numbers?
Try our web interface or integrate with our API.
Launch App API Documentation