Song key finder

Drop a song to see its key, Camelot code, the closest keys and the chords that fit. The sound is read in this browser and never uploaded.

Songs to try

Plategroove-d-major-100bpm.wav9.6 s · 44.1k · mono12 pitch classes · 24 keys
KeyD major
10BClear

Closest keys

D major10B
B minor10A
A major11B
G major9B
A minor8A

Chords in D major

IDiiEmiiiF#mIVGVAviBmvii°C#dim

Key over time 0:00.0 / 0:09.6

D major

What key is this song in?

Drop the song into the player above. The key finder listens to the whole file, adds up how much of each of the twelve notes it hears, and compares that pattern with all 24 major and minor keys. The best match is the big letter in the readout above. Under it you get the Camelot code, the next four closest keys with their scores, and the seven chords that belong to the key.

The groove that is already loaded is a short loop in D major at 100 BPM. Press Play to hear it, then press Hear the scale: the page plays D, E, F#, G, A, B, C#, D and the D major chord, so you can check the answer with your own ears.

Reading the result

  • Key and mode. The tonic (the note that feels like home) and whether the song is major or minor.
  • Camelot and Open Key. The same key as DJ codes. 8B and 1d are both C major, and DJ software can show keys in either system.
  • Certainty. Clear means the winner is well ahead of the next unrelated key. Likely means it is ahead, but not by much. Unclear and No clear key mean the notes do not point to one key; that is an answer too.
  • Closest keys. The top five of the 24 keys, scored from 0 to 1. A relative major or minor close behind the winner is normal, since they share every note.
  • Chords in the key. The seven chords built on the scale, with roman numerals. If a song in G major leans on G, C, D and Em, you will see all four in that row.
  • Key over time. A strip under the chords that splits a long song into sections and names the key of each. A bridge that moves up a step shows up here as a block of a different key.

Key and BPM together

The side panel above also shows the tempo, so one drop gives you both numbers you need to file a track. For the beat itself, every beat drawn over the waveform, half and double time and a click track, open the BPM finder. Once you know the key, you can transpose the whole song up or down in the song key changer, or snap a dry vocal take to that exact scale with Autotune online.

How the key is found

The sound is cut into overlapping slices of about a third of a second, a new one every fifth of a second. Each slice goes through an FFT, and the energy between 55 Hz and 2 kHz is folded into twelve pitch classes, so every C from every octave lands in one bin. The sums over the whole song are compared with the Krumhansl–Kessler key profiles, a set of weights from listening tests that says how strongly each note belongs to a key. The correlation with each of the 24 profiles is the score you see.

This works well on most pop, rock, dance and folk songs. It has known limits, and the page tells you when it hits one:

  1. Relative keys. A minor and C major use the same seven notes. The bass and the chord the song comes back to decide it, and on a short loop they can be close.
  2. Songs that change key. The whole-song answer will be the key that takes up the most time. Use key over time to see the sections.
  3. Drums, speech and noise. With no steady notes there is no key, and you will see No clear key instead of a guess.
  4. Tuning. Notes are read against A = 440 Hz. A song tuned a quarter tone off can split between two neighbouring keys.

Mixing in key with the Camelot wheel

1BB1AG#m2BF#2AEbm3BDb3ABbm4BAb4AFm5BEb5ACm6BBb6AGm7BF7ADm8BC8AAm9BG9AEm10BD10ABm11BA11AF#m12BE12AC#mB · majorA · minor
The Camelot wheel. C major is 8B. The safe next keys are one step around the ring (7B, 9B) or straight in to the relative minor (8A).

DJs mix in key so that two songs playing at once do not clash. On the wheel, a track mixes smoothly with its own number, one number up or down, and the other ring at the same number. So from 10B (D major, the groove above) you can go to 9B, 11B or 10A. The key finder gives you the Camelot code next to the key name, and Copy result puts the key, the code and the tempo on your clipboard in one line.

MoveFrom 8B (C major)Sounds like
Same code8BNo change
One up9B, G majorA lift
One down7B, F majorSettling
Switch ring8A, A minorSame notes, darker

Files and privacy

MP3, WAV, FLAC, M4A, AAC, OGG and the sound track of most video files work, as long as your browser can play them. The first ten minutes are analysed. The file is decoded and read inside this page; it is not uploaded, stored or sent anywhere. To see the notes themselves rather than the key, look at the same file on the spectrogram.

Questions people ask

How accurate is the key finder?

On songs that stay in one key with clear harmony it usually agrees with the published key. It is weaker on relative major and minor pairs, songs that change key, and tracks that are mostly drums. The certainty label and the closest keys tell you how sure it is for your file.

Why does it say A minor when the sheet music says C major?

They share all seven notes, so the score for both is close. Look at the closest keys list: if the other one is just behind, play the scale of each with the song and hear which note feels like home.

What do the Camelot codes like 8A and 8B mean?

They place the 24 keys on a clock face for DJs. The number is the position, B is major and A is minor. Keys next to each other, or the same number in the other ring, mix without clashing.

Does it find the BPM as well?

Yes. The tempo appears in the side panel above and in the copied result. The BPM finder page shows the beats themselves and lets you switch to half or double time.

Is my song uploaded?

No. Your browser decodes the file and this page analyses it on your device. Nothing about the audio is sent anywhere.

Can I find the key from my microphone?

Not on this page yet. Record the song to a file first, or play it from a file you already have.