Ultrasonic Tone Generator
Generate precise high-frequency tones from 15 kHz up to your browser’s Nyquist limit (typically about 22–24 kHz) — sine or square, with click-free volume ramps and a “can you hear this?” check at each step. Useful for tweeter and equipment tests, hearing-limit exploration, and pest-deterrent experiments.
⚠ Two honest limits, by physics: (1) browser audio is digital, so it cannot produce anything above the Nyquist frequency (half the sample rate — shown live in the tool below). True ultrasound such as most bat calls (well above 22 kHz) is unreachable here; that needs a dedicated ultrasonic microphone / bat detector. (2) Most consumer speakers and headphones roll off above ~18–20 kHz, so the tool may produce a signal electrically yet you hear nothing — that is your hardware, not a failure of the tool. Safe volume: high tones can be fatiguing without sounding loud — start quiet and never crank an inaudible tone. Heads-up: pets and younger people may clearly hear tones you cannot. This is a tone generator: there is no microphone and nothing is recorded.
High-frequency signal
How to Use This Generator
- Check your hard ceiling first. The banner at the top of the tool reads your browser’s real audio sample rate and shows the Nyquist limit — the highest frequency it can possibly produce. You cannot set the slider or the number box above that value.
- Pick a mode. Continuous lets you dial any frequency with the slider or type an exact value in hertz. Stepped walks the round checkpoints (15, 16, 17, 17.4, 18, 19, 20… up to your Nyquist). Log sweep glides from 15 kHz to the ceiling over about ten seconds.
- Start the volume low and raise it gently. High tones fatigue ears without sounding loud, so never crank a tone you cannot hear.
- Press Play, then use “Can you hear this?” In stepped mode, answer Yes/No at each step and click Higher to climb until the tone disappears.
- Read the result honestly. Where a tone vanishes is set by your ears and your speaker/headphone together — the tool cannot tell which one ran out first.
Who Can Hear These Tones?
High-frequency hearing varies hugely between people and species. The figures below are widely-published typical ranges, not a measurement of any individual animal — humans from the standard ~20 Hz–20 kHz textbook range (most adults top out far lower), the dog upper limit (~45 kHz) from the LSU School of Veterinary Medicine hearing-range tables, the cat upper limit (~85 kHz at 70 dB SPL) from Heffner & Heffner (1985), Hearing Research, and the “Mosquito” figure from the anti-loitering device patented by Howard Stapleton.
Note the gap: dogs and cats hear far higher than this tool’s ~22–24 kHz Nyquist ceiling, so it cannot reproduce a real ultrasonic dog whistle or bat call — only the human-audible edge of the spectrum.
How It Works
This tool drives the Web Audio API’s oscillator at a frequency you choose and routes it through a gain stage to your speakers or headphones. You can pick a sine or a square waveform, but note that the oscillator is band-limited: it only synthesises harmonics below Nyquist. A square wave’s lowest extra harmonic sits at three times the fundamental, which for any tone in this generator’s 15 kHz-and-up range (45 kHz and higher) is already above the Nyquist ceiling, so it is discarded. In practice that means the square option here produces essentially the same pure tone as sine — the harmonics that would normally distinguish a square wave simply cannot exist at these frequencies. Because digital audio is sampled, there is a hard physical ceiling: by the Nyquist–Shannon sampling theorem, a system sampling at R samples per second can only represent frequencies below R/2. Browsers default to a 44,100 Hz sample rate (the CD rate), giving a Nyquist limit of 22,050 Hz; many devices run at 48,000 Hz, giving 24,000 Hz. The tool reads your actual AudioContext.sampleRate at runtime and caps both the slider and the number box at exactly half of it, so it will never let you request a tone it cannot generate. That is why “true ultrasound” — the dog-whistle and bat-call territory above ~22 kHz — is simply off the table for any normal web page.
The second limit is your transducer. Most consumer speakers and headphones are designed to cover roughly 20 Hz to 20 kHz, and many conventional tweeters begin rolling off well before 20 kHz; reaching cleanly above that usually needs a dedicated super-tweeter. Phone speakers, laptop speakers and Bluetooth links are typically worse and attenuate everything above ~16 kHz. So the generator can faithfully send a 21 kHz electrical signal to a device that physically cannot turn it into sound — you would hear nothing, and nothing would be wrong with the tool. Gain is ramped up and down with the Web Audio scheduler to avoid clicks, the default level is deliberately low, and we cap the peak gain because steady high tones can fatigue your ears without ever sounding loud.
Two honest cautions. First, “I can’t hear it” does not isolate the cause: a missing tone could be your hearing (the high end drops with age — presbycusis) or your hardware rolling off, and a pure generator with no microphone cannot separate the two. Second, because there is no microphone this tool measures nothing — it cannot report dB SPL, distortion, or a response curve. For real numbers you need a calibrated measurement microphone and software such as REW, and for genuine ultrasound capture you need an ultrasonic microphone or bat detector. Use this generator to produce high tones for listening tests and experiments, and reach for instruments when you need measurements.
Frequently Asked Questions
What is the highest frequency this can actually produce?
AudioContext.sampleRate at runtime, shows the exact ceiling, and caps the slider and number box there, so it never lets you ask for a tone it physically cannot make. Anything above that — the dog-whistle and bat-call range — is unreachable with normal browser audio.