BPM, tempo and key detector for audio files

–BPM

Key

–

The file is analysed on your device. It's never uploaded.

How the detector finds the tempo

When you choose a file, your browser decodes it and the page takes up to 75 seconds from just after the intro, where the beat has usually settled. It splits that into 5-millisecond slices and looks for sudden jumps in loudness, the moments where a kick, snare or strong chord hits. Kicks get extra weight because the audio is also passed through a low filter at 180 Hz, which isolates the low end.

Then it compares that pattern of hits with itself, shifted by every gap between 55 and 210 BPM. Wherever the hits line up best is the beat. A slight preference for tempos between 80 and 160 keeps it from picking a silly answer like 62 for a dance track.

All of this runs on your phone or computer. The song isn't sent to a server, so it works with unreleased mixes, and it works offline once the page has loaded.

How the key is found

For the key, the audio is cut into short windows and each one is broken into frequencies. Every frequency belongs to one of the 12 notes, so the page adds up how strongly each note sounds over the whole clip. That note profile is then compared with the classic Krumhansl–Schmuckler profiles for all 24 major and minor keys, and the closest match wins. The result is shown with its Camelot code (8A, 11B and so on) for harmonic mixing.

When to double-check the result

The Camelot wheel in one paragraph

DJs use Camelot codes because they make harmonic mixing a matter of counting. Tracks with the same code mix cleanly. So do neighbours: one number up or down (8A to 9A) or the same number with the other letter (8A to 8B). Jumps larger than that tend to clash unless the mix is short.

Questions

Which file types work?

Anything your browser can play: MP3, WAV, AAC/M4A, OGG and Opus almost everywhere, and FLAC in Chrome, Edge, Firefox and recent Safari. Video files with an audio track (MP4, WebM) work too.

Is there a size limit?

No limit is set, but the whole file is decoded in memory. Songs of 3 to 10 minutes are quick on any phone; a two-hour DJ mix may be slow on older devices.

Can I find the BPM of a song on YouTube or Spotify?

Streaming audio can't be read by another web page, so play the song and tap along instead. Sixteen taps get you within about half a BPM.

How accurate is it?

For music with a steady beat (pop, hip hop, house, techno, rock) it's usually within 1 BPM, and the exact estimate is shown to one decimal. Key detection is harder for any software; treat the key as a strong suggestion and trust your ears.