Tone Generator, Tuner & Hearing Test
Play a sine, square, sawtooth or triangle tone at any whole frequency from 20 Hz to 20 kHz, tune an instrument with your microphone, and step a high tone up to find the top of your hearing, all in your browser with the Web Audio API.
How to Use
- Turn your device volume down first. In the Tone Generator, pick a waveform, drag the frequency slider or type an exact frequency in hertz, set the volume, then press Play. Nothing sounds until you press it.
- Change the frequency, waveform or volume while it plays; the tone follows at once. The C4, A4 440, 1 kHz, 60 Hz and 10 kHz buttons jump straight to those frequencies.
- In the Tuner, press “Start tuner” and allow the microphone. Play or sing one steady note and read its frequency, the nearest note and how many cents sharp or flat it is.
- In the Hearing Test, press Play and step the tone up or down by 500 Hz, or jump to 8 to 20 kHz, to find the highest pitch you can still hear.
- Press Stop, or stop the tuner, when you finish; leaving the Tuner tab also switches the microphone off.
Worked Example
A4 at the default volume. Pressing A4 440 plays 440 cycles a second, one every 1 ÷ 440 = 2.27 ms, which is 48,000 ÷ 440 = 109.1 samples per cycle at a 48 kHz sound card. The default volume 0.20 is multiplied by 0.6, so the sine peaks at 0.12 of full scale: 20 × log₁₀ 0.12 = −18.4 dBFS, and its RMS level is 3 dB lower, −21.4 dBFS.
Notes that are not whole hertz. The frequency box holds whole numbers, so the C4 button, whose equal-tempered pitch is 440 × 2^(−9/12) = 261.63 Hz, plays 262 Hz: 1,200 × log₂(262 ÷ 261.63) = 2.5 cents sharp, too little to hear. The slider is logarithmic, f = 20 × 1,000^(position ÷ 1,000), so each of its 1,000 steps is about 12 cents; it lands on 439 Hz next to A4, which is why the box is there for exact values.
The common mistake: turning the volume up to hear a high tone. If you cannot hear 16 kHz, raising the system volume by 20 dB makes the signal 10 times larger, which can be unpleasant at the frequencies you can still hear and can push small speakers into distortion. Many speakers and earbuds stop reproducing the highest tones anyway, so the honest test is a fixed, comfortable level, which is what the Hearing Test uses.
Show Work
Formulas
A440, Equal Temperament and Autocorrelation
Western tuning divides the octave into 12 equal semitones, each a frequency ratio of 2^(1/12) ≈ 1.05946, and anchors the scale to A above middle C. At a conference held at the BBC’s Broadcasting House in London in May 1939, delegates agreed on 440 Hz for that A; the International Organization for Standardization took it up as Recommendation R 16 in 1955 and formalised it as ISO 16 in 1975. Not everyone follows it: early-music ensembles still tune lower.
The square, sawtooth and triangle waves share the sine’s fundamental but add harmonics at whole-number multiples: odd harmonics only for square and triangle, all of them for sawtooth, which is why they sound brighter. The tuner relies on the repetition those harmonics share: autocorrelation finds the delay at which a sound best matches itself, which is its period, and works well on a single steady note such as a plucked string or a sung vowel. Human hearing is commonly given as 20 to 20,000 Hz, with sensitivity to the highest frequencies falling gradually with age.
About This Tool
Three tools in one page. The Tone Generator plays a sine, square, sawtooth or triangle wave at any whole frequency from 20 Hz to 20 kHz, with a logarithmic slider and quick buttons, and changes follow live while it plays. The Tuner listens through your microphone and shows the frequency, note and cents. The Hearing Test plays a fixed-level sine from 2 kHz to 20 kHz for a quick check of your upper limit.
Everything is made and measured in your browser with the Web Audio API; nothing is recorded or uploaded, and the microphone is only on while the tuner is. The output level is capped at 0.6 of full scale, but your device volume still matters, so start low.
It is for musicians, audio hobbyists checking speakers and rooms, teachers and students, and the curious.
Related tools: Audio Spectrum Analyzer & Spectrogram, Audio System EQ Tuner & RTA, and Audio Converter.
Frequently Asked Questions
What is a tone generator used for?
It plays one steady frequency with nothing else mixed in. That makes it useful for checking speakers, headphones and subwoofers, finding rattles and room resonances, giving a reference pitch such as A4 = 440 Hz, and science and music lessons about frequency, octaves and harmonics.
How loud is it, and is it safe?
The volume box runs from 0 to 1 and is multiplied by 0.6 before it reaches your speakers, so the loudest sine peaks at 0.6 of full scale (−4.4 dBFS) and the default 0.20 peaks at 0.12 (−18.4 dBFS). Your device and amplifier volume still decide how loud that is in the room, so start low. Stop at once if a tone is uncomfortable.
How does the tuner find the pitch?
It takes the latest 2,048 microphone samples (about 43 ms at 48 kHz), ignores them if they are too quiet, and runs autocorrelation: it compares the sound with delayed copies of itself and finds the delay at which they match best. That delay is one period, and the sample rate divided by it is the frequency. It reports 20 to 5,000 Hz, shows the nearest equal-tempered note against A4 = 440 Hz, and turns green within ±5 cents.
What does the hearing test measure?
It is a rough check of your upper limit, not a medical test. It plays a sine at a fixed level from 2 kHz to 20 kHz in 500 Hz steps. Human hearing is commonly given as 20 Hz to 20,000 Hz, and the top end falls gradually with age. Your headphones or speakers may stop reproducing the highest tones before your ears do, so a result is only as good as the equipment.
Is anything recorded or uploaded?
No. Tones are made on your device, and the tuner analyses the microphone in your browser without recording or sending anything. The microphone is used only while the tuner is on.
How do I use the Tone Generator, Tuner & Hearing Test?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Test speakers and headphones
Play 60 Hz to check that a subwoofer is working, then 10 kHz to check the tweeters, at a low volume.
Tune an instrument
Hold a guitar’s low E against the tuner: 82.4 Hz is E2, and 83.0 Hz reads about 12 cents sharp.
Check your hearing range
Step up from 12 kHz in 500 Hz steps to find the highest tone you can still hear on your headphones.
Classroom demonstrations
Compare a 440 Hz sine and square wave to hear how odd harmonics at 1,320 and 2,200 Hz change the sound.
Last updated: