White Noise Generator
Generate soothing white, pink, or brown noise for sleep, concentration, meditation, or relaxation. Adjust volume, set a sleep timer from 15 minutes to 2 hours, and let continuous ambient sound mask distracting noises. All audio is generated locally in your browser — no streaming, no downloads, no internet connection required after loading.
How Does the White Noise Generator Work?
The White Noise Generator uses the Web Audio API's ScriptProcessorNode (with AudioWorkletNode as a fallback in supported browsers) to produce continuous noise signals in real time. Unlike oscillator-based tones that produce periodic waveforms, noise is generated by filling audio buffers with random sample values. For white noise, each sample is a random number between -1 and +1, creating a signal with equal energy across all audible frequencies. This produces the characteristic "hissing" or "static" sound that effectively masks other environmental sounds.
The generated audio signal passes through a GainNode that controls the output volume, allowing smooth real-time adjustment without interrupting playback. When a sleep timer is set, the tool schedules an automatic fade-out and stop after the specified duration, gently reducing volume over several seconds rather than abruptly cutting off the sound. The entire process runs within your browser's audio processing thread, consuming minimal CPU resources while maintaining consistent, glitch-free playback.
What Is White Noise?
White noise is a random signal with a flat frequency spectrum, meaning it contains equal power at every frequency within the audible range (20 Hz to 20,000 Hz). The name comes from an analogy to white light, which contains all visible frequencies of light at equal intensity. Because white noise covers the entire frequency spectrum uniformly, it effectively masks other sounds by filling in the frequencies that disruptive noises occupy. A slamming door, a barking dog, or traffic outside your window — all these sounds are absorbed into the constant blanket of white noise, preventing them from startling or distracting you.
Pink Noise vs. White Noise
Pink noise differs from white noise in its frequency distribution. While white noise has equal energy per frequency (flat spectrum), pink noise has equal energy per octave, meaning its power decreases by 3 dB per octave as frequency increases. This gives pink noise a deeper, warmer quality compared to the brighter, hissier character of white noise. Mathematically, pink noise follows a 1/f power spectrum — lower frequencies are louder than higher ones. Many people find pink noise more natural and pleasant for sleep because it resembles sounds found in nature, such as steady rainfall, wind through trees, or waves on a shore. Research published in the journal Frontiers in Human Neuroscience (2012) found that pink noise during sleep may enhance memory consolidation by synchronizing brain wave activity.
Brown Noise (Brownian Noise)
Brown noise, also called Brownian noise or red noise, has an even steeper frequency rolloff than pink noise — its power decreases by 6 dB per octave, following a 1/f-squared spectrum. The name comes from Robert Brown and Brownian motion (the random movement of particles), not the color brown. This produces a deep, rumbling sound similar to a strong waterfall, distant thunder, or heavy ocean surf. Brown noise is generated by integrating white noise — each sample is derived from the previous one plus a small random change, with a "leak" factor that prevents the signal from drifting too far. Many users prefer brown noise for its bass-heavy, enveloping quality that feels particularly calming and immersive.
Science of Noise for Sleep and Focus
The primary mechanism by which noise aids sleep and concentration is auditory masking. Your brain continuously monitors environmental sounds for potential threats, even during sleep. Sudden changes in the sound environment — a car horn, a conversation, a door closing — trigger an arousal response that can wake you or break your concentration. Continuous background noise raises the auditory threshold, making these transient sounds less noticeable relative to the baseline. Studies published in the Journal of Caring Sciences (2016) found that white noise significantly improved sleep quality in hospital patients exposed to high levels of environmental noise.
For focus and productivity, moderate ambient noise (around 70 dB) has been shown to enhance creative thinking by inducing a moderate level of processing disfluency, according to research in the Journal of Consumer Research (2012). This gentle cognitive challenge promotes abstract processing without overwhelming working memory. However, very loud noise impairs concentration, so keeping your noise generator at a moderate volume is key. The sweet spot for most people is a comfortable background level that masks distractions without demanding conscious attention.
Safe Listening Levels
While noise generators are safe at reasonable volumes, prolonged listening at high volumes can damage hearing just like any other sound. The World Health Organization recommends keeping personal audio device volume below 60% and limiting listening time to no more than 60 minutes at a stretch (the 60/60 rule). For sleep, keep the volume at the lowest level that effectively masks disruptive sounds — typically 30-50% of your device's maximum output. If you need to raise the volume above 50% to mask noise, consider using earplugs or earbuds instead, or address the source of the disruptive noise directly.