🔊

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

Your audio sample rate: probing… Hard ceiling (Nyquist): probing…
Hz (15,000 – the Nyquist cap)
Ready.

How to Use This Generator

  1. 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.
  2. 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.
  3. Start the volume low and raise it gently. High tones fatigue ears without sounding loud, so never crank a tone you cannot hear.
  4. 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.
  5. 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.

Listener Typical upper limit Notes
Human (textbook) ~20 kHz The classic 20 Hz–20 kHz range; reached only by healthy young ears.
Human (most adults) ~15–17 kHz Falls steadily with age (presbycusis); over-40s often miss 16 kHz.
“Mosquito” tone ~17.4 kHz Anti-loitering / “teen buzz” frequency, usually audible only under ~25.
Dog ~45 kHz Far above the browser ceiling — a real dog whistle goes higher than this tool can.
Cat ~85 kHz Tuned to ultrasonic rodent calls; well beyond anything browser audio reaches.

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?
Half your device’s audio sample rate — the Nyquist limit. Browsers default to a 44,100 Hz sample rate, so the ceiling is 22,050 Hz; many devices run at 48,000 Hz, giving 24,000 Hz. The tool reads your real 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.
Can this generate true ultrasound for a dog whistle or bat detector?
No. “Ultrasound” properly means frequencies above human hearing, and dogs hear up to about 45 kHz while cats reach roughly 85 kHz — far above the ~22–24 kHz Nyquist ceiling of browser audio. A real dog whistle goes higher than this tool can produce, and most bat echolocation calls are well above 22 kHz too. To generate or detect genuine ultrasound you need dedicated hardware: an ultrasonic transducer, a USB ultrasonic microphone, or a bat detector.
I set 20 kHz but hear nothing — is the tool broken?
Almost certainly not. Two things can silence a high tone: your hearing (most adults cannot hear much above 15–17 kHz, and the limit falls with age) and your hardware (most speakers and headphones roll off above ~18–20 kHz, and phone or Bluetooth output is often worse). The generator can send a perfect 20 kHz signal to a device that simply cannot reproduce it. Try lowering the frequency in 1 kHz steps to find where it returns — that boundary is set by your ears and gear together.
Why can my kids or my pets hear a tone I can’t?
High-frequency hearing fades with age, so children and teenagers routinely hear tones around 17–19 kHz that older adults miss — that is the principle behind the “Mosquito” anti-loitering device, which uses about 17.4 kHz. Pets hear far higher than any human: dogs to roughly 45 kHz and cats to around 85 kHz. So a tone that is silent to you may be clearly audible, and potentially annoying, to a child, a teenager, or an animal in the room. Be considerate with the volume and how long you play it.
Is it safe to turn the volume up to hear the highest tones?
Be careful. Steady high-frequency tones can be fatiguing and can stress small tweeters, yet they often don’t sound loud, so it is easy to push the level too high. Start at a low volume and raise it gently; if a tone is inaudible, don’t keep cranking it — it is probably above your hearing or your device’s limit, and turning it up will not bring it back. Protect your ears and your drivers, and keep sessions short.
Can this measure my hearing or my speaker’s response?
No. This is a tone generator with no microphone, so it produces sound but measures nothing — it cannot report dB SPL, distortion, or a frequency-response curve, and it is not a hearing test or a medical diagnosis. The “Can you hear this?” check is an informal, educational exploration only. For a real hearing assessment, see an audiologist for an audiogram; for speaker measurements, use a calibrated measurement microphone with software such as REW.