Free online tone generator
Tone generator that holds any pitch you type
Type a frequency, choose sine, square, triangle or sawtooth, and the tone sounds until you stop it — there is no timer on it. Stack a second oscillator beside the first and two pitches within twenty hertz of each other swell in and out at exactly their difference, which the page prints in hertz and in milliseconds between swells. Both edges of every tone are a ten-millisecond ramp, because a gain node switched instantly produces a click louder than the tone it was meant to introduce.
- 100% free
- No signup
- 1 Hz to 24 kHz
- 4 waveforms
- 2 oscillators
Oscillator A
One frequency and nothing above it. Everything else on this page is measured against it.
Every start and stop is a 10 ms ramp rather than a switch, which is why you hear the tone appear instead of a click. The output sample rate appears here once a tone has been started — it sets the highest frequency that can exist without folding back down as a lower one. Typed values are capped at 24,000 Hz for that reason, and each oscillator is capped at -6 dBFS — loud enough to shake a desk speaker, quiet enough to survive a mistake made with headphones on.
How to use a tone generator
Three controls decide everything: the number, the shape, and whether there is a second tone beside it.
Type the frequency, then hold it
The number field takes anything from 1 to 24,000 and the slider covers 20 Hz to 20 kHz on a logarithmic track, so one centimeter of travel is the same musical distance at the bottom as at the top. Press Hold this tone and it sounds until you press it again — there is no timer, because a tone generator is used to hold a pitch against something else and a tone that expires halfway through is the one failure it cannot have.
Choose the shape as deliberately as the pitch
A sine at 100 Hz contains 100 Hz and nothing else, which is what you want when you are asking whether a speaker can produce that note at all. A sawtooth at 100 Hz also contains 200, 300, 400 and every step above, so a grille or a desk that rattles at 700 Hz will rattle on it. Switching shape restarts the oscillator behind overlapping ramps, so you hear a crossfade rather than two clicks.
Stack the second oscillator and listen for the beat
Add oscillator B, set it two or three hertz from A, and the pair swells in and out at exactly the difference between them: 440 and 443 pulse three times a second. Move B until the pulsing slows and stops and the two are the same frequency to within a fraction of a hertz — far finer than anyone can judge two pitches by ear on their own. The panel prints the difference and the milliseconds between swells while you do it.
Technical specifications
| Frequency range | 1 Hz to 24,000 Hz typed in; the slider covers 20 Hz to 20 kHz on a log track |
|---|---|
| Waveforms | Four — sine, square (harmonics at 1/n), triangle (1/n²) and sawtooth (all harmonics at 1/n) |
| Oscillators | Two, independent in frequency, waveform, level and channel |
| Beat readout | Difference in hertz and the swell interval in milliseconds, shown while the two are within 20 Hz |
| Ramp at each edge | 10 ms linear, on start, stop and every waveform change |
| Retune while sounding | Frequency moves with a 10 ms time constant — no restart and no tick |
| Level ceiling | -6 dBFS per oscillator, and the two sum, so a matched pair peaks near 0 dBFS |
| Pitch readout | Nearest equal-tempered note and the offset in cents, referenced to A4 = 440 Hz |
Frequently asked questions
Why is there silence until I press the button, even after the page loads?
Because a browser refuses to make sound before you interact with the page. The audio engine starts in a suspended state and only a genuine click, tap or key press resumes it — an autoplay rule that exists because pages used to open with noise. It is also why the frequency and waveform controls do nothing audible on their own: they are staged, and the first press is what actually starts the oscillator.
I typed 23,000 Hz and heard a lower whistle instead of nothing. What happened?
You heard the tone fold back down, which is what happens above half the output sample rate. A 44,100 Hz output can only represent frequencies up to 22,050 Hz, so a request for 23,000 comes out at 44,100 minus 23,000, or 21,100 Hz — a real tone at a pitch you did not ask for. The page prints the sample rate it ended up with once a tone has been started, and half that number is the highest frequency that can exist here honestly.
Can I tune a guitar or a piano with this?
Yes, and the beat readout is the reason it works better than matching two pitches by ear. Set the reference — 440 Hz for A4, or 82.41, 110, 146.83, 196, 246.94 and 329.63 for the six open strings of a guitar in standard tuning — and adjust the string until the pulsing against the tone slows to nothing. The page cannot listen to you, so it has no opinion about whether you got there; the beat disappearing is the instrument telling you, not the tool.
The square wave is far louder than the sine at the same level setting. Is that a fault?
No, and the difference is about 3 dB. Level here sets the peak amplitude, but loudness follows the average energy: a sine spends most of its time between the peaks, while a square wave sits at full amplitude the whole cycle, so it carries roughly 1.4 times the energy for the same peak. On top of that a square has harmonics stretching upward into the region the ear is most sensitive to, which adds perceived brightness the meter never sees.
Why does the pitch slide instead of jumping when I drag the slider?
Because the running oscillator is retuned rather than replaced, and the retune is smoothed over about ten milliseconds. Jumping a frequency instantly puts a step in the waveform, and a step is a broadband event — it is heard as a tick on top of the tone. The glide also happens to be the useful behavior: sliding through a range while listening for the pitch where something in the room starts buzzing is most of what people open this page to do.
If I put oscillator A in the left ear and B in the right, why does the beating change?
Because the beat you normally hear is arithmetic done by the air, not by you. Two waves arriving at the same eardrum add and cancel, and the swelling is that sum getting louder and quieter. Send them to separate ears and no such sum exists — what is left is a much fainter effect produced further up in the brain, which is why it sounds thin and vanishes if you lift one earcup.
Can I run two tones out of two different pairs of speakers?
Not from a web page. The browser sends everything to one output device, the one your operating system has selected, and there is no interface for choosing a second. Left and right here are the two channels of that single device, done with a stereo pan, so a hard-left tone genuinely leaves the right channel silent — but both oscillators are still going out of the same sound card.
About frequency, waveform and the click at the edge of a tone
A frequency is a count: hertz means cycles per second, so 440 Hz is a pressure wave pushing and pulling on your eardrum 440 times every second, and pitch is what that count feels like. The relationship is multiplicative rather than additive, which is the part that surprises people — 220 Hz to 440 Hz is one octave, and so is 4,000 Hz to 8,000 Hz, even though one gap is 220 hertz wide and the other is 4,000. That is why the slider on this page is logarithmic and why musicians measure in cents, a hundredth of the twelve equal steps in an octave. Human hearing spans roughly 20 Hz to 20,000 Hz at birth, about ten octaves, and almost all of it is used by almost nobody: everything in speech lives between 100 Hz and 8,000 Hz.
Waveform is not decoration, it is which frequencies are present. A sine is the only shape that contains one and nothing else; every other repeating wave is a sine at the fundamental plus sines at whole multiples of it, and the shape is just the recipe. A square wave carries the odd multiples with amplitude falling as one over the harmonic number, a sawtooth carries every multiple at the same rate, and a triangle carries the odd ones falling as one over the square of the number, which is why it sounds nearly as plain as a sine. This matters the moment you point a tone at hardware. Asking whether a speaker reproduces 40 Hz with a sawtooth proves nothing, because you will hear its harmonics at 80, 120 and 160 and conclude the fundamental was there — a bass test has to be a sine for exactly that reason. A sawtooth is the right tool for the opposite job: hunting the pitch at which something in the room buzzes, which is where a speaker test usually ends up.
The engineering detail worth stealing from this page is the ramp. An oscillator switched on at full amplitude does not start at zero — it starts wherever in its cycle it happens to be, and that vertical step contains energy at every frequency at once. The result is a click, and at low levels the click is louder than the tone behind it, which is how a page can convince someone their subwoofer works when all they heard was the transient. Ten milliseconds of fade removes it completely and costs nothing you can perceive. The same reasoning applies at the far end of the chain: a wireless headset re-encodes everything before it reaches the driver, adds a couple of hundred milliseconds doing it, and takes airtime from every other device on the same radio — which is why a Bluetooth mouse starts skipping when a Bluetooth headset is streaming beside it, something the cps test and the typing speed test show from the other side. If you want to know how high your own hearing reaches rather than how high the tone goes, the hearing range test walks a fixed ladder instead of a free-running dial.
What is happening while a tone plays
Every number on this page is worked out by JavaScript running in the tab you are reading it in. Nothing you type, paste or open is uploaded, logged or kept, which is also why the tools carry on working after you disconnect from the network.
An oscillator is arithmetic, not a file: the browser computes the waveform sample by sample on its audio thread and hands it straight to the output your operating system has selected. Nothing is downloaded to play a tone, no microphone is opened, and the numbers in the Copy summary are assembled from the controls you set rather than from anything measured about you.