MateenLabs No ads · Runs in your browser

Key Finder: Estimate the Musical Key of a Song

Choose a song or a recording of your own and the tool listens for which notes are used most, then compares them with the typical note patterns of the 12 major and 12 minor keys. You get the closest three and a plain warning that it is an estimate.

  • Free Forever
  • No Login
  • No File Uploads
  • Browser Processing

Find the key

Drop your audio file here

or

MP3, WAV, M4A, OGG, FLAC and more. Your file stays on your device.

Choose an audio file to get started.

What this tool does not do

  • It does not give a certain answer. The key is an estimate and can be wrong, especially for short clips, key changes and noisy or percussive music.
  • It does not find the tempo, chords or melody. For the tempo use the BPM Detector.
  • It does not follow changes of key inside a song. It gives one answer for the part it analysed.
  • It does not keep, upload or share your file.

How a key is estimated from sound

A musical key is a set of notes that sound like they belong together, with one note, the tonic, that feels like home. A song in C major uses mostly C, D, E, F, G, A and B, and leans on C and G. A song in A minor uses the same seven notes but leans on A. Finding the key by ear means noticing which notes recur and which one feels like the end of the sentence. This tool does the first half of that: it counts how much each of the twelve notes is present.

To do this, the file is mixed to mono and reduced to a lower sample rate, and about two minutes from the middle of it are cut into slices of roughly three quarters of a second. Each slice is converted to a spectrum, and the energy at every frequency between about 65 Hz and 2 kHz is added to the pitch class it is closest to, so all the Cs of every octave count towards C. Averaged over the whole piece, this gives a "chroma" profile: twelve numbers that say how much of each note was heard.

The profile is then compared with the Krumhansl-Schmuckler key profiles, which come from listening experiments where people rated how well each note fits a key. The tool tries all 24 keys, with the pattern turned to start on each note, and ranks them by how strongly they correlate. The score you see is each key compared with the best one. It is not a probability. Relative keys (C major and A minor) share notes, so they are often close, and the tool says so.

The estimate works best on a few minutes of music with a steady key and clear pitched instruments. It is weaker with strongly percussive or noisy tracks, music without a clear tonal centre, songs that change key, and instruments tuned away from the standard pitch. Use it as a starting point and confirm with your ears or an instrument.

  • Estimate of the key and mode (major or minor) from an audio file.
  • The three closest keys with a score relative to the best one.
  • A note when the top two are almost tied, and the relative major or minor named.
  • Analyses up to two minutes from the middle of the track; files up to 30 minutes and 150 MB.
  • Sharp or flat spelling of the result.
  • The file is analysed on your device and is not uploaded.

How to use the Key Finder

  1. Press Choose audio file or drop a file onto the box.
  2. Wait a moment while it is decoded and analysed.
  3. Read the best match and the next two candidates. If they are close, treat the result as uncertain.
  4. Use the Chord Transposer or the Pitch Shifter to move the music to a key that suits you.

Is it private?

Yes. Your audio is decoded and analysed inside your browser and never leaves your device. This tool does not upload it to Mateen Labs or any external service, and it does not store it.

Read our tools privacy policy →

Frequently asked questions

How accurate is it?

It is an estimate and we do not claim a figure. It is often right on clear, tonal music with a steady key, and it can be wrong on anything else. The score only shows how close each key is to the best match, never the chance of being right. Check the answer on an instrument.

Why does it say A minor when I think the song is C major?

The two keys use the same seven notes, so their profiles are very similar. Which one a song is in depends on which note feels like home, and a program that only counts notes can pick the wrong one. The result names the relative key so you can try both.

Why only two minutes of the file?

To keep the page fast on phones. The middle of a song is usually a better guide than its quiet intro or outro. If a song changes key in the middle, trim the part you care about first and analyse that.

What if my song is not tuned to A = 440 Hz?

A recording that is slightly sharp or flat still works, because the notes are grouped by the nearest semitone. A recording that is tuned about halfway between two semitones, or a modern sample-based track that has been pitched, can blur the result.

Does it detect key changes?

No. It gives one key for the whole analysed part. To check a different section, cut it out with the Audio Trimmer and analyse it separately.

Is my file uploaded?

No. The file is decoded and analysed by your browser. Nothing is sent to Mateen Labs or any other service, and nothing is stored.

Related tools