Skip to content
Aback Audio

How to find the key of a song with a key finder (and confirm it by ear)

Use a key finder to find the key of a song from an MP3 or WAV, read its Camelot code for harmonic mixing, check it by ear and transpose it for your voice.

By Devvrat Hans13 min read

To find the key of a song, load the audio into a key finder, read the key and its Camelot code, then play the tonic chord against the track to confirm it. Most pop, rock and electronic songs give a clear answer; the one trap is that every major key shares its notes with a minor key, so C major and A minor are easy to mix up. This guide explains what a key is, how key detection software works, how to read the Camelot wheel for DJ mixing, how to find the key by ear on an instrument, when detection fails, and how to transpose a song to suit your voice. The Song Key Finder used here is processed locally in your browser, so the song is not uploaded.

24

possible keys

12 tonics, major or minor

55 Hz to 4.2 kHz

range analyzed

tonal peaks only

±12

semitones to transpose

plus ±100 cents fine tune

What a musical key is

A song's key tells you two things: which note feels like home, and which set of seven notes the melody and chords mostly use. In C major the home note is C and the scale is C D E F G A B, the white keys of a piano. The key is why the last chord of a song sounds finished and why a wrong note in a solo sounds wrong.

Major keys use the pattern whole, whole, half, whole, whole, whole, half step and tend to sound bright and settled. Minor keys lower the third, sixth and seventh notes and tend to sound darker or more tense. With 12 possible home notes and two modes there are 24 keys in common use.

Relative and parallel keys

Every major key has a relative minor that uses exactly the same notes and starts three semitones lower: C major and A minor, G major and E minor, F major and D minor. They have the same key signature, so the only difference is which note the music treats as home. Parallel keys share a tonic but not a scale: C major and C minor differ by three notes.

Common keys and their relative minors
Major keyRelative minorSharps or flatsNotes
C majorA minornoneC D E F G A B
G majorE minor1 sharp (F#)G A B C D E F#
D majorB minor2 sharpsD E F# G A B C#
A majorF# minor3 sharpsA B C# D E F# G#
E majorC# minor4 sharpsE F# G# A B C# D#
F majorD minor1 flat (Bb)F G A Bb C D E
Bb majorG minor2 flatsBb C D Eb F G A
Eb majorC minor3 flatsEb F G Ab Bb C D

Sharps and flats are often two names for the same pitch: C# and Db are one piano key. Our key finder names the tonic with sharps and adds an "Also written" line with the flat spelling, so a result of A# minor also reads Bb minor, which is how most sheet music would write it.

How to find the key of a song with a key finder

The Song Key Finder reads MP3, WAV, FLAC, M4A, OGG, Opus and AIFF files, and video files such as MP4 and MOV, so it works as an MP3 key finder and for songs inside clips. It runs in Chrome, Edge, Firefox and Safari on Windows, Mac, Android and iPhone.

  1. 1

    Open the song

    Drop the file onto the tool, or click the drop zone to browse your files. On a phone this opens the system file picker (Files on iPhone, Downloads or a cloud drive on Android).

  2. 2

    Let it analyze

    A progress panel titled Detecting the key appears while the whole file is analyzed in a background worker. Cancel stops it at any time.

  3. 3

    Read the key and Camelot code

    The result shows Key (for example A minor), its Camelot code (8A) and a Confidence of High, Medium or Low. Low confidence comes with a hint that key changes, atonal parts or heavy drums make detection harder.

  4. 4

    Hear the chord

    Press Hear the major chord or Hear the minor chord to play the tonic triad, synthesized in your browser. Play it while the song is paused at a chorus: the right key sounds like it belongs.

  5. 5

    Check the notes chart

    Notes in the track shows the relative strength of all 12 notes. Highlighted bars are the notes of the detected scale and the darkest bar is the root.

  6. 6

    Use the alternatives

    Other possible keys lists the next three candidates with their Camelot codes, and Mixes well with lists three compatible keys for DJ sets. Copy key copies a line such as A minor (8A).

Open the Song Key FinderDrop a song to see its key, Camelot code, a notes chart and a playable tonic chord.

How key detection software works

Every music key finder, from DJ software to our browser tool, follows the same basic recipe: measure how much of each note is present, then find the key whose typical note distribution matches best.

Step 1: the chromagram

A chromagram folds all octaves together into 12 bins, one per pitch class (C, C#, D and so on). A low A at 110 Hz, the A at 440 Hz and the A at 880 Hz all add to the A bin. Our tool mixes the song to mono, resamples it to 22,050 Hz and takes a detailed spectrum (8,192 points) about every 0.19 seconds. Only clear tonal peaks between 55 Hz and 4.2 kHz count: a peak must stand about 12 dB above its neighborhood, which keeps drum noise and hiss out of the chart. Each peak is assigned to its nearest note, with less weight the further it sits from the exact pitch.

Step 2: matching key profiles

A key profile is a template of how often each scale degree appears in music in that key: the tonic and fifth are strong, the notes outside the scale are weak. The classic method, the Krumhansl-Schmuckler algorithm, rotates a major and a minor profile to all 12 tonics and picks the one that correlates best with the chromagram. Our key finder uses the same correlation approach with the Temperley (Kostka-Payne) profiles, chosen because, on synthetic chord progressions in all 24 keys, they were less likely than the original Krumhansl-Kessler profiles to mistake a I-IV-V-I progression for the key of its fourth chord.

Step 3: confidence

Confidence comes from how far the winning key is ahead of the runner-up, scaled by how well the winner fits. A song that sits firmly in one key scores High. When the top two keys are close, typically a relative major and minor, confidence drops and the alternatives list becomes the real answer.

The Camelot wheel for harmonic mixing

The Camelot wheel renames the 24 keys as numbers 1 to 12 with a letter: A for minor, B for major. Neighboring numbers are a fifth apart, which is musically close, and the same number with the other letter is the relative key. DJs use it because "8A to 9A" is easier to remember in a booth than "A minor to E minor".

Camelot codes for all 24 keys
CamelotMinor key (A)Major key (B)
1G# minor (Ab minor)B major
2D# minor (Eb minor)F# major (Gb major)
3A# minor (Bb minor)C# major (Db major)
4F minorG# major (Ab major)
5C minorD# major (Eb major)
6G minorA# major (Bb major)
7D minorF major
8A minorC major
9E minorG major
10B minorD major
11F# minorA major
12C# minorE major
  • Same code (8A to 8A): the safest mix; the keys are identical.
  • Same number, other letter (8A to 8B): relative major and minor, same notes, a change of mood.
  • One number up or down (8A to 9A or 7A): a fifth apart, shares six of seven notes. This is what the Mixes well with list shows, together with the relative key.
  • Two numbers up (8A to 10A): two semitones higher, a common "energy boost" move that works best over a short blend.

Key is only half of a smooth mix. Two tracks also need tempos within a few percent, which is what the BPM Detector is for; our guide to finding the BPM of a song covers half and double tempo traps. And remember that changing a track's speed without keeping pitch also changes its key: about 6 percent faster is one semitone higher, which moves it seven steps around the wheel.

How to find the key of a song by ear

Software is quick, but finding the key by ear is a skill worth having, and it is the way to settle a low-confidence result. You need an instrument, a keyboard app or a tuner.

  1. Find the home note. Pause the song at the very end or at the end of a chorus and hum the note that feels most resolved. That is usually the tonic.
  2. Name that note. Find it on a piano or guitar, or hum it into the Online Tuner in Chromatic mode, which shows the note name and octave of whatever you sing.
  3. Decide major or minor. Play the major and minor chord on that note (or use the key finder's chord buttons). One will sound like it fits the song; the other will sound off.
  4. Check the chords. Work out two or three chords from the song. In a major key the chords on the first, fourth and fifth notes are major; in a minor key the chord on the first note is minor.
  5. Look at the melody. If the melody keeps landing on a note that is not in your scale, try the relative key or the key a fifth away.

If you play guitar, tune first: a guitar a quarter tone flat will make every chord sound slightly wrong against the record. Our guide on how to tune a guitar online walks through it. For a visual check, the Spectrum Analyzer shows the dominant frequency of a held note with its nearest note name and cents offset.

When key detection gets it wrong

SituationWhat you seeWhat to do
Relative major or minorC major reported for an A minor songPlay both tonic chords; check Other possible keys
Modal music (Dorian, Mixolydian)A neighboring major or minor keyName the home note by ear; the scale is the mode
Key changeOne key, Medium or Low confidenceCut each section and analyze it separately
Detuned recordingA key one semitone off, low confidenceMeasure the tuning, then correct it with fine cents
Heavy drums or distortionLow confidence, scattered notes chartAnalyze a quieter verse or intro
Atonal, noise or speechLow confidence, any keyThe song may not have a key; trust your ears

Modal songs

Many rock, folk and jazz songs use modes rather than plain major or minor. A song in D Dorian uses the notes of C major but treats D as home, and a song in G Mixolydian uses the same notes again with G as home. A 24-key detector can only answer with major or minor, so it will usually report one of the neighboring keys. The notes chart still helps: if the darkest bar is not the reported tonic, the song is probably modal.

Detuned recordings

The analysis assumes standard tuning with A at 440 Hz. A recording tuned to 432 Hz is about 32 cents flat and usually still lands on the right notes. Older recordings transferred from tape at the wrong speed, or bands that tune a quarter tone (50 cents) down, sit between two notes, so the chart smears across neighbors and the result can come out a semitone off. If you suspect this, check a sustained note with the Online Tuner or the Spectrum Analyzer, then correct the recording with the Pitch Shifter's Fine tune control: +32 cents brings 432 Hz material to 440 Hz.

Transposing a song to suit your voice

Once you know the key, you can move the whole song up or down to fit your range. The Pitch Shifter moves audio by Semitones from -12 to +12, plus a Fine tune of -100 to +100 cents, without changing the tempo. Each semitone moves the key by one note: a song in E major shifted down two semitones is in D major.

How a pitch shift changes the key and the Camelot code
ShiftE major becomesCamelot changeSound
-1 semitoneEb major12B to 5BBarely noticeable on most songs
-2 semitonesD major12B to 10BComfortable for many singers
-3 semitonesC# major (Db)12B to 3BVoices start to sound darker
+2 semitonesF# major12B to 2BBrighter, more energy
-5 semitonesB major12B to 1BClearly processed on vocals

Small shifts of one to three semitones sound natural on most material. Larger ones change the character of voices (deeper or chipmunk-like) because the vocal formants move with the pitch, so for karaoke practice it is usually better to pick a lower or higher version of the song if one exists. To slow a song down for practice without changing its key, use the Speed Changer with the original pitch kept, as explained in how to change audio speed and pitch.

Open the Pitch ShifterMove a song up or down in semitones and cents to fit your voice, with the tempo unchanged.

Tools used in this article

Frequently asked questions

What key is this song in?

Drop the file into the Song Key Finder and read the key and Camelot code. If confidence is Low, play the tonic chord and check the other possible keys, because the answer may be the relative major or minor.

Can I use a key finder on an MP3?

Yes. MP3 compression keeps the notes intact, so a key finder works on MP3 files just as well as on WAV or FLAC. M4A, OGG, Opus and the soundtrack of MP4 or MOV videos work too.

Why does the key finder say C major when the song sounds minor?

C major and A minor use the same seven notes, so their chromagrams look almost identical. The detector picks the best statistical fit; your ear decides which note feels like home. Other possible keys usually lists the relative key right below.

How accurate is automatic key detection?

For tonal pop, rock and electronic music with a single key it is usually right or one closely related key away (the relative or a fifth apart). Songs with key changes, modes, heavy distortion or no clear tonality are harder for any key finder.

Can I find the key of a song on YouTube or Spotify?

Streamed songs cannot be opened as files. Find the key by ear instead: hum the home note into the Online Tuner to name it, then decide major or minor by playing both chords along with the song.

What does 8A or 8B mean?

They are Camelot codes. The number is the position on the wheel and the letter is the mode: A for minor, B for major. 8A is A minor and 8B is C major, its relative major.

Does the key finder read the key tag in my file?

No. It estimates the key from the audio. Key tags written by other software can be missing or wrong, and they use different notations, so measuring the recording is more reliable.

Is my song uploaded to find the key?

No. The file is decoded and analyzed inside your browser tab, and the tonic chord is synthesized on your device. The file is not uploaded.

Related articles