audio.cihat.dev

White noise generator

Press Play for brown noise, or mix white, pink and brown noise with rain, fan and ocean sounds. Set a sleep timer and the sound fades out on its own. Everything is synthesized in your browser; there are no audio files to download.

0%
0%
60%
0%
0%
0%

40%

With a timer set, the sound fades out over the last minute and then stops.

How to use it

  1. Move the sliders to choose the sounds and how much of each you want. Brown noise is on to start with; add rain or a fan on top, or switch to plain white or pink noise.
  2. Press Play and set the volume as low as still covers the sounds you want to mask.
  3. Pick a sleep timer if you want it to stop by itself. The last minute fades out so the change does not wake you.

White, pink and brown noise: the difference

The colours describe how the noise’s power is spread across frequency. White noise has equal power at every frequency, like white light. Because each octave up spans twice as many hertz, white noise gains 3 dB per octave when you add it up octave by octave, so it sounds bright and hissy. Pink noise falls 3 dB per octave (power proportional to 1/f), which puts equal power in every octave: it sounds even, like steady rain. Brown noise falls 6 dB per octave (1/f²) and sounds deep, like a waterfall or the rumble inside a plane. It is named after Robert Brown and Brownian motion, not after the colour.

Noise colours compared
NoiseSpectral density slopePowerSounds like
WhiteFlat, 0 dB per octaveEqual per hertzHiss, a detuned radio
Pink−3 dB per octaveEqual per octaveSteady rain, wind in leaves
Brown−6 dB per octaveFalls with the square of frequencyWaterfall, distant surf, cabin rumble

How the sounds are made

Nothing here is a recording. White noise is a stream of random sample values. Pink noise passes that stream through a sum of six simple filters with different time constants (Paul Kellet’s method), which together approximate the −3 dB per octave slope across the audible range. Brown noise is white noise integrated: each sample adds a small random step to the previous one, with a slight leak back towards zero so it never drifts off.

Rain is pink noise with about 60 tiny, randomly timed droplet clicks a second, band-limited between 400 Hz and 9 kHz. The fan is brown noise with its highs rolled off above about 1.1 kHz and a gentle boost around 260 Hz, where the hum of a room fan sits. The ocean is brown noise whose level swells and recedes every six seconds, with a little hiss at the crest of each wave.

Each sound is generated once as a 12-second stereo loop, with left and right independent so the sound feels wide on headphones, and the end of each loop is crossfaded into its start so there is no click at the seam. After that the browser only plays the loop, which keeps the processor almost idle through the night.

Using noise for sleep, focus and babies

Steady noise works by masking: a door, a neighbour or traffic stands out less against a constant background. Brown and pink noise mask low rumbles well and are gentler on the ear than white noise, which is why many people prefer them for sleep. White noise masks voices and higher sounds more strongly. Try each for a few minutes at the same volume and keep the one you notice least.

Keep the volume as low as still does the job. Your device cannot know how loud the sound is at your ear, so judge by comfort: you should be able to talk over it easily. For a baby, place the speaker across the room rather than next to the cot, keep it quiet, and use the timer so it does not run all night unless you want it to.

Playing all night and with the screen off

In a computer browser the sound keeps playing in a background tab. On phones, the operating system decides: some browsers keep Web Audio running with the screen locked, others pause it. If yours stops, keep the screen on at low brightness, or plug the phone in. The page registers with the system media controls, so you can pause it from the lock screen where the browser supports that.

Questions people ask

Is brown noise or white noise better for sleep?

There is no single answer; it depends on what you need to mask and what you find calm. Brown noise is deeper and softer, white noise is brighter and covers voices better. Try both at the same volume.

What is the difference between pink and brown noise?

Pink noise loses 3 dB of power per octave and sounds like steady rain. Brown noise loses 6 dB per octave, so it has much less treble and sounds like a deep rumble.

Can I play white noise all night?

Yes. Leave the timer off and the loop plays until you stop it. On a phone, check that your browser keeps playing with the screen locked, or leave the screen on at low brightness.

Does this download any audio files?

No. All sounds are synthesized in your browser with the Web Audio API, so it works on a slow connection once the page has loaded.

How loud should white noise be for a baby?

Quiet: well below conversation level, with the speaker across the room rather than in or next to the cot. A phone cannot measure the level at the baby’s ear, so err on the soft side.

Can I mix rain with brown noise?

Yes. Every sound has its own slider, and you can play any combination at once.