Skip to main content

BPM and key detector online

Detect tempo, key, and audio file properties for DJing, production, or music analysis.

Free & unlimited
--
BPM from taps

Tap the button or press Space or T

All processing happens in your browser. No data is sent to any server.

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

Key facts about BPM and key detector online
Tempo methodEnergy-onset autocorrelation: 20 ms windows, 10 ms hop, on audio downsampled to roughly 11 kHz
Tempo range60-200 BPM. Anything outside that window is clamped to the nearest end, so very slow or very fast tracks report the boundary value
Key method12-bin chroma vector correlated against the Krumhansl-Schmuckler major and minor key profiles
Key analysis windowFFT size 4096 with 50 percent overlap, capped at the first 200 windows — roughly the opening 9 seconds at 44.1 kHz
Pitch range scannedOctaves 2 to 7, referenced to A4 = 440 Hz
ConfidenceRated high, medium or low from how far the best autocorrelation peak stands above the average energy
Compatible keysEach detected key comes with five harmonically related keys for mixing
Tap tempoTap along and the page shows your BPM next to the detected one for comparison
File details reportedDuration, sample rate, channel count, bit rate and codec, read from the decoded buffer and the file itself
OutputNothing is written. This is an analyser — results are shown on screen and copyable as plain text
Accepted inputMP3, WAV, OGG, FLAC, AAC, M4A and AIFF, up to 500 MB
Channels usedAnalysis 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. 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. 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. 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. 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. 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. 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.

Specs & compatibility
Input formatsMP3, WAV, OGG, FLAC, AAC, M4A, AIFF
Maximum file size500 MB
Detectable tempo60 to 200 BPM
Keys recognisedAll twelve major and twelve minor keys, reported with their relative-key name
Analysis timeSeconds for a typical track; the key stage stops after 200 FFT windows, so it does not grow with file length
Tempo stage costAutocorrelation is capped at 1000 lag samples per lag, so long files do not become quadratically slow
BrowsersChrome, Edge, Firefox and Safari 14.1+ — Web Audio only, no WebAssembly required
Accuracy caveatA 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
Reliable on material with a clear percussive pulse — house, techno, hip hop, most pop — and unreliable on anything else. The method is energy-onset autocorrelation: it looks for a repeating spacing between energy jumps. That works when the kick and snare dominate the envelope, and fails on legato strings, ambient music, rubato piano or live performance with human drift. The confidence bar reflects this directly; it measures how much the winning autocorrelation peak stands out from the average. When it reads low, use the tap tempo button instead.
This is the classic octave error in tempo detection and it is not a bug in the arithmetic. A track at 140 BPM also has a strong periodicity at 70 BPM, because every second beat is also a beat. Autocorrelation cannot tell which of those the listener calls 'the tempo' — that is a musical judgement about metrical level, not a signal property. If the reported figure is exactly 2x or 0.5x what you feel, take the one that matches the genre: 120-130 for house, 140-175 for drum and bass, 80-100 for hip hop.
By chroma matching. The analyser takes overlapping 4096-sample windows, measures the energy at each of the twelve pitch classes across octaves 2 to 7, and sums them into a twelve-bin chroma vector. That vector is then rotated through all twelve roots and correlated against the Krumhansl-Schmuckler major and minor profiles — weightings derived from listening experiments that describe how prominent each scale degree is in a key. The best correlation wins. It is the standard textbook approach and it is a heuristic, not a transcription.
Three usual causes. First, only about the first nine seconds are analysed — the routine stops after 200 FFT windows — so an intro in a different tonality decides the answer. Trim the file to a representative section and try again. Second, relative major and minor keys share all seven notes, so C major and A minor produce nearly identical chroma vectors and the profiles are what separate them; ambiguous material flips between them. Third, heavily percussive or distorted tracks have chroma dominated by noise rather than pitch.
No. The file is read into memory in your browser tab, decoded with the browser's own decodeAudioData, and analysed by JavaScript running on this page. Because the tool produces no output file, it does not even need the WebAssembly engine that the converters here download — after the page loads, running an analysis makes no network request whatsoever. You can confirm this with an empty Network panel while a track is being analysed. Nothing is stored, and the results disappear when you close the tab.
Not on this page — it analyses one file at a time, because the results screen is built around inspecting a single track with its waveform, confidence bars, compatible keys and tap-tempo comparison. For a library-wide pass, the copy button gives you the full result as plain text for each file, which is quick to paste into a spreadsheet as you work through a folder. If you only need the technical details rather than tempo and key, the audio converter's file info panel reads those without a full analysis.
View all

Part of Audio tools that run in your browser

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy