DTMF — dual-tone multi-frequency, the touch-tone system invented at Bell Labs in 1963 and standardised as ITU Q.23 — encodes each phone-keypad key as the sum of two pure sine waves: one from a row group (697, 770, 852 or 941 Hz) plus one from a column group (1209, 1336, 1477 or 1633 Hz). The 4-by-4 grid gives 16 distinct symbols: digits 0-9, the four "A B C D" tones (defined but rarely keypadded), and the * and # marks. The two-tone scheme is deliberate — it can't be faked by any normal speech or music signal because both frequencies must be present simultaneously at similar amplitudes.
The decoder rules
A standards-conformant DTMF decoder follows three checks before accepting a key as detected:
- Threshold: each of the two tones must clear an absolute level (your slider).
- Twist: the high-group tone must be in the range −8 dB to +4 dB relative to the low-group tone, the asymmetric ITU Q.23 tolerance. (Telephone-line equalisation already boosts the high group, so the spec is strict on positive twist and lenient on negative.) Larger differences indicate a distorted, synthesised-wrong or harmonic signal — not a clean DTMF pair.
- Interferer rejection: the unselected row/column tones (the six other DTMF frequencies) must be at least 6 dB below the chosen pair. Stronger neighbouring peaks usually mean voice or music is leaking through.
Tone duration tracking
Each time a detection appears, a timer starts; the on-screen duration grows while the tone is held. When the tone disappears (or the detected key changes), the detection is finalised and added to the history log with its total duration. Very short detections (< 30 ms) are debounced away to avoid logging noise spikes. A short "holdover" window (~50 ms) bridges the natural FFT-frame gap so a steady tone isn't repeatedly logged as separate detections.
Single-tone mode
Picks the strongest peak above threshold in the 50 Hz – 20 kHz band and reports its frequency using parabolic interpolation for sub-bin precision. Useful for: function-generator measurement, hearing-test tone identification, instrument-tuning reference checks. Frequencies are bucketed to 5 Hz windows for stable duration logging — small drift around 440 Hz still registers as the same detection.
Multi-tone mode
Lists the top-N local-maxima peaks above threshold across the spectrum. Useful for: chord identification, harmonic-content inspection, multi-tone test-signal analysis (CCIF, SMPTE intermodulation, etc.). A bar shows each peak's level relative to the threshold.
Why doesn't my phone's DTMF tones decode reliably?
Most modern smartphones synthesise the DTMF tones locally for the UI feedback only — they're played through the speaker at low level, processed by the phone's automatic gain control, and frequently bandwidth-limited. Real DTMF (as sent over the call audio channel) is much cleaner because it bypasses the speaker entirely. If you're trying to decode a phone via its built-in speaker through a mic in the same room, try: (1) raising the phone volume; (2) lowering the detection threshold; (3) using a separate DTMF generator (Web Audio test sites work well) to verify the decoder.
What are the A, B, C, D keys?
They're part of the original DTMF spec but were never put on consumer phone keypads. They were used by the US military's AUTOVON system for call-priority signalling (A = "Priority", B = "Immediate", C = "Flash", D = "Flash Override") and survive today in amateur-radio repeater control and some industrial signalling systems. The tool will decode them if you generate them — useful for testing the full keypad coverage.
What is "twist" and why does my generator fail the check?
Twist = the dB difference between the high-group and low-group tone amplitudes (positive = high stronger). Real telephone systems boost the high group slightly to compensate for line-loss frequency response, so a small positive twist (1–4 dB) is normal. The ITU Q.23 spec is asymmetric: high may be at most +4 dB above low, or up to −8 dB below — and this tool enforces that exact tolerance. If your generator outputs a tone pair with high 6 dB stronger than low, this tool will (correctly) reject it as out-of-spec. Most online DTMF generators are well within tolerance; a failure usually means your mic capture is heavily EQ'd or one of the frequencies is being masked by noise.
Why FFT instead of Goertzel for DTMF detection?
Real-world DTMF decoder chips use the Goertzel algorithm — it computes magnitudes at just the 8 target frequencies, which is computationally cheaper than a full FFT when you only want those bins. For a web-based tool though, the Web Audio AnalyserNode gives us a Hann-windowed FFT essentially for free, and at FFT 8192 / 48 kHz the bin width (5.86 Hz) is fine enough that all 8 DTMF frequencies land within ±2.5 Hz of a bin centre. The tool searches a ±2-bin window around each target to catch the actual peak. Result: same detection performance with much simpler code.
My single-tone reading flickers between two nearby frequencies — is that real?
Usually it's the source — function-generator analog drift is typically 10–100 ppm = 0.04–0.4 Hz at 4 kHz. But the detection bucketing rounds detected frequencies to 5 Hz windows so a stable tone won't get repeatedly re-logged in history. If your displayed frequency is jumping by 5+ Hz between frames, the signal has multiple comparable peaks (harmonics, beating tones, or noise) and the argmax is alternating; use multi-tone mode to see what's happening.
How short a tone can I detect?
The bottleneck is the FFT frame duration: FFT 4096 ≈ 85 ms, FFT 8192 ≈ 170 ms, FFT 16384 ≈ 340 ms at 48 kHz. The shortest tone that overlaps a full frame is detectable; shorter than that risks missing the frame. The 30-ms minimum-detection debounce filters out noise spikes shorter than this. Standard DTMF tones are 70-100 ms in real telephony, well above the FFT 8192 frame size.
Can I detect DTMF over speakerphone or through walls?
Reflective surfaces, speakerphone compression, and walls all reduce signal quality but the tool's interferer-rejection threshold (6 dB) is fairly tolerant. Long room reverberation can cause one DTMF tone's reflection to be misread as a different frequency though — try lowering the threshold and using a more directional mic.
Is the mic audio uploaded anywhere?
No. The entire detection pipeline runs locally in your browser via the Web Audio API. Audio goes mic → AnalyserNode → FFT → DTMF logic, never to any server. Browser-level permission applies; revoke any time via the address-bar permission icon.