Music / Harmony

Song Key Finder: Detect the Key of a Song from an Audio File

Find a likely key from an audio file or eight seconds of microphone input, with Camelot and Open Key codes, relative key, chroma chart and tempo estimate.

Song Key Finder: Detect the Key of a Song from an Audio File: Estimate the tonal centre of a recording by measuring the energy of the twelve pitch classes and comparing the pattern with conventional major and minor key profiles. The result shows the strongest match and a runner-up, along with both correlation scores. Their gap describes how clearly the two candidates are separated; it is not a probability that the key is correct. You also get the relative major or minor key, Camelot and Open Key codes for harmonic mixing, and an independent BPM estimate when there is a clear beat. The first two minutes of a file or eight seconds of microphone playing are analysed. Modal music, sparse melodies and songs that modulate can have ambiguous keys, so compare several passages and use your ears. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Song key finderLocal processing

Runs entirely in your browser

The first two minutes are analysed; modal music, sparse melodies and songs that modulate can have ambiguous keys.

Try several sections and trust what you hear; half-time and double-time BPM interpretations are also possible.

Phone microphones often roll off below about 80 Hz, so low notes may be harder to measure.

Compare tempo interpretations

Krumhansl–Schmuckler key finding

The Krumhansl–Schmuckler method correlates pitch-class strengths with rotated key profiles. The profiles used here are from Krumhansl and Kessler's Tracing the dynamic changes in perceived tonal organization in a spatial representation of musical keys (https://doi.org/10.1037/0033-295X.89.4.334). They describe conventional major and minor tonality.

DJ notation and tonal ambiguity

Mixxx's manual explains musical key notation and harmonic mixing (https://manual.mixxx.org/2.5/en/chapters/advanced_topics.html). Camelot and Open Key codes identify positions on the circle of fifths; they do not resolve ambiguous tonal centres or changes within a song.

How to use it

  1. Open a recording or play a passage with chords into the microphone.
  2. Wait for the key, runner-up and tempo estimate.
  3. Compare the chroma chart, relative key and DJ codes with what you hear.

Privacy & limitations

Files and microphone sound are analysed on your device. Eight seconds of microphone samples are held temporarily for analysis and are never uploaded.

Related tools

Frequently asked questions

How do I find the key of a song?

Open a file containing a passage with a clear tonal centre. Read the best key and compare it with the runner-up. If the song changes key, try separate sections.

What does the confidence mean?

Confidence is the gap between the best and second-best correlation scores. A small gap means the profiles are difficult to distinguish. It is not a calibrated percentage or guarantee.

Why might the detected key be wrong?

Modes, unusual tuning, sparse melodies, strong overtones and key changes can weaken a major/minor profile match. Relative keys share many notes, so their ambiguity is common.

What are Camelot and Open Key codes?

They label keys on a circle of fifths for DJs. Camelot uses A for minor and B for major; Open Key uses m and d. These are two names for the same detected key, not separate analyses.

Does the tool also find BPM?

Yes, when the audio has a clear pulse. Half-time and double-time interpretations can both make musical sense. Open the BPM detector to compare tempo candidates.

Can I use my phone microphone?

Yes. Play chords for eight seconds in a quiet space. Phone microphones often roll off below about 80 Hz, so bass-heavy material may be less reliable.

Free tool · runs in your browser · no account required