Audio analysis · No upload
Find a song’s key on your device
Find a song’s musical key from its audio, with the runner-up key and the score margin beside it.
The strip shows the energy in each of the twelve pitch classes, scaled so the strongest reads 1.000; the values are not shares of the total energy. The ranking listed below it is worked out from this profile alone. When a result is close, compare the top two scores and the margin between them.
One key per file, from a mono 11,025 Hz copy. None if the profile is nearly flat or the best correlation is below 0.5; noise, silence and speech can fail, while a tuned-kick drum loop can pass. Over ten minutes is refused by name. Under a 0.02 margin the Key row keeps the winner but the verdict is too close to call. Takes .wav, .wave, .mp3, .m4a, .aac, .ogg, .oga, .opus, .flac, .aif, .aiff and .weba.
How this key finder works
Your browser reads the file and decodes its audio. The page mixes the samples to one channel and walks the whole recording in short frames to build one pitch profile for the track; the Analysed row shows the duration and the number of frames. The browser decodes the full recording before its length is checked, and files longer than ten minutes are then refused by name.
The page runs 60 Goertzel filters, one for each equal-tempered note from C2 to B6 with A = 440 Hz: twelve pitch classes across five octaves. Each filter reads the Fourier bin nearest its note, so its frequency can sit slightly off the exact pitch. The readings fold into twelve pitch-class bins, scaled to the strongest, and that profile is correlated against twenty-four key profiles and ranked. The page shows the key, the runner-up and the gap between their correlations.
The tool assumes twelve-tone equal temperament, tests only major and minor keys and names one key for the whole file, so it does not follow key changes; Dorian or Mixolydian music comes out as one of the twenty-four keys or is refused. A small margin means the result is ambiguous, but a large margin, or passing the refusal checks, can still hide a key change or a recording with no single clear key. The flatness check rejects a profile above 0.97 on a scale where 1 is perfectly flat, and clips shorter than one frame, about 0.37 s, are refused. Pitched percussion can pass these checks, because to these energy measurements a kick tuned to a note is a note. The tool does not estimate tempo, chord progression, genre or time signature.