How to Find the Key of a Song: By Ear, By File and Online
A key is a song's home note plus its mode: major or minor. A minor and C major use the same seven notes yet feel different, because a different degree acts as home. You need the key the moment you add anything to a track — vocals, a sample, a counter-melody — or mix it with another track.
The catch: hearing the key is a trained skill, and file tags lie or are missing altogether.
Three ways to find it
By ear. Find the note the melody settles on — usually the last note of a phrase, or the bass note at the end. Play it on an instrument, then check whether a minor or major triad on that note sounds stable. Free, but it takes practice and works best on simple harmony.
From notation or MIDI. With a score or a MIDI file, the key reads off the key signature and the cadences. Useless for finished audio.
Automatically from the audio file. The key and BPM finder splits the signal into twelve pitch classes and builds a chromagram — how much energy landed on each degree across the whole recording. That profile is matched against reference profiles for all twenty-four keys using the Krumhansl–Shepard method, and the closest one wins. It takes under a minute and requires neither a trained ear nor notation.
Reading the result
You get three things, and all three are useful:
| Output | Example | Why it matters |
|---|---|---|
| Note and mode | A minor | The classical notation musicians expect |
| Camelot code | 8A | Compatibility with other tracks at a glance |
| BPM | 92 | Tempo for loop selection and mixing |
The Camelot code is not an alternative name for the key — it is a way of writing it so that compatibility is immediately visible. See Camelot Wheel and harmonic mixing for the full picture.
When automatic detection gets it wrong
An honest list, not fine print:
- Key changes within the track. Modulations, medleys and DJ mixes return the dominant key, not each one.
- Relative major and minor. A minor and C major contain the same notes. With few clear cadences, the algorithm may pick the relative. For mixing this is nearly harmless — those keys sit next to each other in Camelot — but verify by ear before tracking vocals.
- Tuning away from 440 Hz. A noticeably detuned recording shifts the whole chromagram and the answer slides by a semitone.
- Material without clear harmony. A drum loop, noise ambient or solo percussion simply has no key to find.
A thirty-second sanity check
Take the note the tool reported and play a triad on it over the track — minor if the answer was minor. If it sits still and does not fight the harmony, the answer is right. If it feels tense, try the relative key: three semitones up from a minor key (A minor → C major), three down from a major one.
This check is faster than arguing with the algorithm and settles almost every doubt.
What to do next
With the key in hand you can pick samples that will not clash, choose a comfortable vocal register, or slot the track into a set list. Working with a purchased instrumental? See how to find the key of a beat — it covers what to do when the beat and your voice do not meet in the same register.
Once the track is assembled, the remaining job is loudness and dynamics for the platforms — that is mastering, and the key no longer affects it.
Questions and answers
What is the fastest way to find a song's key?
Upload the file to a key and BPM finder. It splits the recording into twelve pitch classes and compares the accumulated profile against reference profiles for every major and minor key. You get the note, the mode and the Camelot code.
Can I trust the key written in the filename or tags?
Rarely. Those labels are typed by hand, often missing, and frequently belong to a different version of the track. You end up verifying by ear anyway.
The tool says A minor but I hear C major. Which is right?
Those are relative keys — the same seven notes with a different tonal centre. On short or harmonically sparse material the algorithm may prefer the relative. In Camelot they share a number (8A and 8B), so for mixing the difference barely matters; for tracking vocals, check by ear.
What about songs that change key partway through?
You get the dominant key. Modulations, medleys and DJ mixes return an average — the algorithm honestly reports whichever key occupies most of the recording.
Upload a track — a finished master in seconds.
Open mastering →AI mastering onlineLUFS analyzer