Music key detector
Estimate the key of a song or recording, with the closest alternatives and a pitch class profile, so you can confirm it by ear.
Accepted files: .wav,.mp3,.m4a,.aac,.flac,.ogg,.oga,.opus,.webm,audio/*. Choose one file. Up to 256 MiB in total.
One file up to 256 MiB, 10 minutes, 8 channels and 60 million samples, at 8,000 to 192,000 Hz. The range must lie inside the recording and contain at least one 170 millisecond frame. WAV is read directly with every channel and sample intact. MP3, M4A, AAC, FLAC, OGG, Opus and WebM are decoded by your browser and resampled to 48 kHz first, so decoding support depends on the browser. Files are decoded and measured on your device and are never uploaded. Downloads: JSON report with the key, correlation, lead over the next key, pitch class profile and full ranking, and a CSV of all 24 keys. The key is estimated in your browser; check it by ear. Up to 1,000,000 characters. Review the settings before running.
Your result
How to use Music key detector
- Choose one audio file from your device.
- Set a start and end time if the key changes or you only want one section.
- Run the estimate and read the most likely key and the next choices.
- Play the tonic scale on an instrument to check the result, then download the JSON report and the ranking CSV.
Useful next steps
How the estimate works
The tool measures how much energy falls on each of the 12 pitch classes between about 65 Hz and 2,100 Hz, using 170 millisecond frames. It then correlates that profile with the 24 major and minor key profiles of Krumhansl and Kessler (Cognitive Foundations of Musical Pitch, 1990) and ranks the keys by correlation.
Reading the result
The result is an estimate. Relative keys such as C major and A minor share the same notes, so they often rank close together; the lead over the next key shows how clear the choice was. Music that modulates, uses modes or has strong drums can mislead the estimate. Check by ear before you rely on it.
What is not included
Key changes are not tracked over time. Choose a start and end time to test one section. Tuning that is far from A = 440 Hz shifts energy between pitch classes and lowers the confidence.