About the White Noise Generator
This white noise generator plays continuous white, pink or brown noise straight from your browser — nothing to download, no account, and no audio files streamed from a server. The sound is synthesised on your device with the Web Audio API, so it never repeats audibly and keeps playing offline once the page has loaded.
People use noise to mask background sounds while sleeping, studying or working in an open office, to settle babies, and to give tinnitus a softer backdrop. Pick white noise for a bright, hissy mask, pink noise for a more natural rain-like sound, or brown noise for a deep rumble many people find easiest to sleep to. A sleep timer fades the sound out gradually so it does not wake you when it stops.
Keep the volume moderate: for sleep, a level well below normal conversation is enough, and for infants a 2014 study in the journal Pediatrics recommended placing sound machines as far from the crib as practical, at a low volume. The page also explains how each noise colour differs in its spectrum.
How to use the white noise generator
- 1Pick a noise colour: white for bright masking, pink for balanced, brown for deep and soft.
- 2Press Play and set a comfortable, low volume.
- 3Choose a sleep timer and how long the fade-out should be.
- 4Leave the tab open; the sound fades and stops on its own when the timer ends.
Formula and method
Noise “colours” describe how power is spread across frequency. White noise has equal power per hertz (a flat spectral density). Because each octave contains twice as many hertz as the one below, white noise gains 3 dB per octave in octave bands, which is why it sounds bright. Pink noise falls 3 dB per octave in density, giving equal energy in every octave — closer to how we hear. Brown (Brownian or red) noise falls 6 dB per octave, so bass dominates.
The generator creates random white samples, then filters them: pink noise uses a bank of first-order filters (Paul Kellet’s method), and brown noise integrates the white signal with a small leak to stop it drifting. A long looping buffer with a crossfaded seam keeps playback seamless.
- S(f)
- Power spectral density at frequency f
- f
- Frequency in hertz
Worked examples
Brown noise with a 30-minute sleep timer
Brown noise falls 6 dB per octave per hertz, which is −3 dB per octave band. The 63 Hz octave sits 7 octaves below 8 kHz, so it is 7 × 3 = 21 dB stronger. A 30-minute timer stops after 1,800 s, with a one-minute fade starting at 29:00.
White noise for focus, timer off
White noise has a flat density, so each higher octave band holds 3 dB more energy. The 8 kHz octave is 21 dB stronger than the 63 Hz octave, giving the familiar hiss. With the timer off it plays until stopped.
Pink noise for 8 hours with a 5-minute fade
Pink noise has equal energy in every octave (0 dB per octave band). An 8-hour timer is 28,800 seconds; the five-minute fade begins at 7 h 55 min.
Frequently asked questions
What is the difference between white, pink and brown noise?+
White noise has equal power at every frequency and sounds hissy. Pink noise has equal power in every octave, so it sounds softer and more natural. Brown noise drops 6 dB per octave and sounds like a deep rumble.
Is brown noise better for sleep?+
Many people prefer brown or pink noise for sleep because the lower, smoother sound is less harsh than white noise. Research on noise and sleep is mixed, so the best colour is the one you find most relaxing at a low volume.
Is it safe to play white noise all night?+
At a low volume it is generally considered fine for adults. Keep it well below conversation level, and for babies place any sound source well away from the crib at low volume, as a 2014 study in Pediatrics recommended.
Does this white noise generator work offline?+
Yes. Once the page has loaded, the noise is generated on your device with the Web Audio API, so it keeps playing without an internet connection and uses no streaming data.
Why does the sound stop when my phone locks?+
Some mobile browsers suspend web audio when the screen locks or the tab is in the background. Keep the tab in the foreground, or check your browser’s background-audio settings.