How a Web Audio Tone Generator Works
A tone generator produces a single, steady pitch with a known frequency, and that simple ability turns out to be useful in a surprising number of situations. This online tone generator creates a pure tone directly in your browser using a Web Audio OscillatorNode routed through a GainNode for volume, so nothing is downloaded and nothing is uploaded. You can choose the waveform between sine, square, sawtooth, and triangle, set any frequency from 20 to 20000 Hz which spans the full range of human hearing, pick a musical note and let the tool find its frequency, and export the result as an uncompressed WAV file. Musicians use it as a tuning reference, audio engineers use it to test and calibrate equipment, and anyone curious about sound can use it to hear exactly what a specific frequency or waveform sounds like.
The engine behind it is the browser's built-in oscillator. When you press play, an OscillatorNode is created with your chosen waveform type and frequency, and its output passes through a GainNode that controls the volume before reaching your speakers or headphones. To avoid the harsh popping sound that happens when audio starts or stops abruptly, the tool ramps the gain up over roughly 10 milliseconds at the start and back down over about 10 milliseconds at the stop, so each tone fades cleanly in and out. The four waveforms differ in their harmonic content: a sine wave is a single pure frequency with no overtones, while square, sawtooth, and triangle waves add harmonics that make them sound brighter and, importantly, louder than a sine wave at the same volume setting.
Converting between musical notes and frequencies uses twelve-tone equal temperament with A4 fixed at 440 Hz, which corresponds to MIDI note number 69. The formula is frequency equals 440 multiplied by 2 raised to the power of the note number minus 69, divided by 12. Working through the notes, A4 comes out at 440 Hz, the A one octave higher at A5 is exactly double at 880 Hz, middle C written as C4 works out to about 261.63 Hz, and A sharp above middle A, written A sharp 4, lands at about 466.16 Hz. This equal-temperament tuning is why every semitone step multiplies the frequency by the same ratio, and it is the standard tuning used across almost all modern instruments and software.
The presets make common jobs one click away. The A4 at 440 Hz preset gives a stable tuning reference for acoustic instruments. The 1 kHz preset produces the classic calibration tone used to check audio levels and line up equipment. A hearing-test preset lets you sweep frequencies to find the edges of what you can still hear, which naturally drops with age. A binaural preset plays two slightly different tones, one in each ear, an effect some people use for relaxation. When you export, the tool renders the tone through an OfflineAudioContext to produce a clean WAV file, and because WAV is uncompressed the file is fairly large, roughly 172 KB for every second of stereo 16-bit audio at 44.1 kHz, which is the trade-off for lossless quality.
A safety note matters here more than with most tools. High-frequency tones played at high volume can genuinely damage your hearing, and because the square and sawtooth waveforms are louder than a sine wave at the same setting, switching waveform can make the sound jump in perceived loudness. Always start with the volume low, especially before playing high frequencies or the brighter waveforms, and raise it gradually. Use headphones with particular care since the sound sits right against your ears. Beyond that, the tool is genuinely handy: tune a guitar to a 440 Hz reference, check whether a laptop speaker rattles at a certain frequency, confirm a stereo channel is wired correctly by playing a tone on one side, or simply learn to recognise what 1000 Hz sounds like. Everything runs locally in your browser, so it works instantly with no signup and no data leaving your device.