BPM and key detector online
Detect tempo, key, and audio file properties for DJing, production, or music analysis.
Tap the button or press Space or T
Drop a track in and this page reports its tempo in BPM, its musical key, a confidence rating for each, and the file's technical details. Both analyses run in your browser on the decoded audio. Tempo comes from onset detection: the signal is downsampled to about 11 kHz, split into 20 ms energy windows with a 10 ms hop, differenced to find where energy jumps, then autocorrelated across lags corresponding to 60-200 BPM. Key comes from a chroma vector — the energy at all twelve pitch classes summed across octaves 2 to 7 — correlated against the Krumhansl-Schmuckler major and minor profiles. A tap-tempo button lets you check the machine's answer against your own ear, and the compatible-key list gives you the neighbouring keys that will mix cleanly.
Key facts about BPM and key detector online
| Tempo method | Energy-onset autocorrelation: 20 ms windows, 10 ms hop, on audio downsampled to roughly 11 kHz |
|---|---|
| Tempo range | 60-200 BPM. Anything outside that window is clamped to the nearest end, so very slow or very fast tracks report the boundary value |
| Key method | 12-bin chroma vector correlated against the Krumhansl-Schmuckler major and minor key profiles |
| Key analysis window | FFT size 4096 with 50 percent overlap, capped at the first 200 windows — roughly the opening 9 seconds at 44.1 kHz |
| Pitch range scanned | Octaves 2 to 7, referenced to A4 = 440 Hz |
| Confidence | Rated high, medium or low from how far the best autocorrelation peak stands above the average energy |
| Compatible keys | Each detected key comes with five harmonically related keys for mixing |
| Tap tempo | Tap along and the page shows your BPM next to the detected one for comparison |
| File details reported | Duration, sample rate, channel count, bit rate and codec, read from the decoded buffer and the file itself |
| Output | Nothing is written. This is an analyser — results are shown on screen and copyable as plain text |
| Accepted input | MP3, WAV, OGG, FLAC, AAC, M4A and AIFF, up to 500 MB |
| Channels used | Analysis reads the left channel only; a track with very different left and right content will skew both results |
What happens to your file
Nothing is uploaded and no engine is downloaded. The file is read into an ArrayBuffer in this tab, decoded by the browser's own decodeAudioData, and analysed by JavaScript on this page — the downsampling, the onset autocorrelation, the chroma extraction and the key correlation all run on your CPU in the tab. No copy of the audio is created and nothing is written to disk. Since this tool produces no output file, it does not even need the WebAssembly engine the converters use; after the page has loaded, analysing a track makes no network request at all.
About this tool
- 1
Load a track
Drop an MP3, WAV, OGG, FLAC, AAC, M4A or AIFF onto the page. A waveform is drawn from the decoded buffer while the analysis runs.
- 2
Run the analysis
The page detects tempo and key in sequence and reports both with a confidence bar. Confidence comes from how clearly one autocorrelation peak dominates, not from any external reference.
- 3
Read the tempo
The BPM figure comes with a tempo category — slow, moderate, fast — and typical genres for that range. If confidence is low, the track probably has no steady pulse for the algorithm to lock onto.
- 4
Check it with tap tempo
Tap the button in time with the music. Your tapped BPM appears next to the detected one. A clean 2x or 0.5x relationship between them means the detector found the wrong metrical level, not the wrong tempo.
- 5
Read the key
The detected key comes with its scale notes and five compatible keys. Use those for harmonic mixing or for picking a sample that will sit in the same tonality.
- 6
Copy the results
The copy button puts BPM, confidence, key, duration, sample rate, channels, bit rate, codec and filename on the clipboard as plain text, ready to paste into a track sheet or DJ library note.
| Input formats | MP3, WAV, OGG, FLAC, AAC, M4A, AIFF |
|---|---|
| Maximum file size | 500 MB |
| Detectable tempo | 60 to 200 BPM |
| Keys recognised | All twelve major and twelve minor keys, reported with their relative-key name |
| Analysis time | Seconds for a typical track; the key stage stops after 200 FFT windows, so it does not grow with file length |
| Tempo stage cost | Autocorrelation is capped at 1000 lag samples per lag, so long files do not become quadratically slow |
| Browsers | Chrome, Edge, Firefox and Safari 14.1+ — Web Audio only, no WebAssembly required |
| Accuracy caveat | A heuristic analyser, not a reference tool. Percussive four-to-the-floor material reads reliably; rubato, live and ambient material does not |
- If the detected BPM is exactly half or double what you hear, the detector locked onto the wrong beat division. Multiply or divide by two and trust your ear.
- Low tempo confidence on a track with clear drums usually means heavy sidechain compression or a swung groove flattening the onset peaks.
- Key detection only reads roughly the first nine seconds. On a track with a long ambient intro in a different tonality, skip ahead and trim the file before analysing.
- Analysis uses the left channel. For a track with a hard-panned instrument or a wide stereo mix, convert to mono in the audio converter first for a steadier result.
- The compatible-key list is straightforward relative and neighbouring keys, which is the same logic behind the Camelot wheel most DJ software uses.
- Tracks outside 60-200 BPM are clamped to the boundary. A 55 BPM ballad reports 60, and a 210 BPM drum and bass track reports 200 — check which half-time or double-time reading makes musical sense.
- Use the tap tempo button on anything rubato or live. A human tapping beats a heuristic on material with no machine pulse every time.
- Tempo detection by energy-onset autocorrelation
- Key detection by chroma matching against Krumhansl-Schmuckler profiles
- Confidence rating on both tempo and key
- Tap tempo for checking the detected BPM by ear
- Compatible-key suggestions for harmonic mixing
- Scale notes for the detected key
- Duration, sample rate, channels, bit rate and codec readout
- One-click copy of the full analysis as plain text
- Working out the BPM of a track before beatmatching it in a DJ set
- Finding the key of a sample so it can be pitched into the key of your project
- Checking that a downloaded stem really is the tempo the filename claims
- Building a DJ library note with tempo, key and compatible keys for each track
- Picking a backing track in a key that suits a singer's range
- Confirming the sample rate and codec of an audio file without opening a DAW
Related tools
View allPart of Audio tools that run in your browser
Works well with this6
More audio tools10
Updated