Home › Audio & Video › Song Key Finder

Song Key Finder

Drop in a song to find its musical key, whether it is major or minor, its tempo in BPM and its Camelot code for harmonic mixing. The tool analyses the notes in the audio on your device and shows the scale, the chords that fit and how sure it is.

Last updated:

Choose a song, or press Try a demo clip to see how it works.

Advertisement
Advertisement

How to use the Song Key Finder

  1. Choose a song: drop an audio or video file on the box, or press Try a demo clip.
  2. Wait a few seconds while the notes and rhythm are analysed on your device.
  3. Read the key, its Camelot code, tempo and confidence. A close-call note appears when two keys are almost tied.
  4. Check by ear: play the scale or the tonic chord along with the song; the right key's tonic chord sounds like “home”.
  5. Copy the result or switch the key profile and note naming to compare.

How key detection works

The finder follows the classic key-finding method used in music information retrieval:

  1. Spectrum: the audio is resampled to 22,050 Hz and cut into overlapping frames of 8,192 samples (about 0.37 seconds). Each frame is transformed with an FFT, and spectral peaks between 55 Hz (A1) and 3,520 Hz (A7) are located with sub-bin accuracy.
  2. Tuning: the average distance of all peaks from the nearest equal-tempered note gives the recording's tuning offset, which is removed before the next step.
  3. Chroma: each peak's frequency becomes a note number, n = 69 + 12 × log2(f ÷ 440), and its strength is added to one of the 12 pitch classes. Summed over the whole song this gives the pitch-class profile.
  4. Key profile matching: the profile is compared with all 24 rotated major and minor key profiles using the Pearson correlation coefficient. The best match is the key; the gap to the runner-up drives the confidence score.

Krumhansl-Kessler key profiles

In probe-tone experiments (1982), listeners rated how well each of the 12 notes fitted after a key had been established. These ratings are the default template; the tonic, fifth and third rate highest.

Scale step1♭22♭334♯45♭66♭77
Major6.352.233.482.334.384.092.525.192.393.662.292.88
Minor6.332.683.525.382.603.532.544.753.982.693.343.17

Camelot wheel reference

CodeMinor (A)Major (B)CodeMinor (A)Major (B)
1G♯ minorB major7D minorF major
2E♭ minorF♯ major8A minorC major
3B♭ minorD♭ major9E minorG major
4F minorA♭ major10B minorD major
5C minorE♭ major11F♯ minorA major
6G minorB♭ major12C♯ minorE major

G♯ minor is also written A♭ minor, and E♭ minor as D♯ minor. For a smooth mix, move to the same number, one number up or down, or swap A and B on the same number.

Frequently asked questions

How does the song key finder work?

It computes a chromagram: the song is split into short frames, each frame's spectrum is analysed, and the energy of every note is folded into the 12 pitch classes (C, C♯, D … B). That pitch-class profile is correlated with the 24 major and minor key profiles measured by Krumhansl and Kessler, and the key with the highest correlation wins.

How accurate is automatic key detection?

For most pop, rock, electronic and classical music with a clear tonal centre the top result is right most of the time. The most common error is confusing a key with its relative major or minor (for example C major and A minor), because they share the same notes. Songs that change key, use modes like Dorian or Mixolydian, or are mostly drums are harder.

What is the Camelot code?

The Camelot wheel numbers the 24 keys from 1 to 12 with A for minor and B for major, so that keys a step apart on the circle of fifths are neighbours. DJs mix tracks with the same code, one number up or down, or the same number with the other letter for a smooth harmonic transition. For example A minor is 8A and C major is 8B.

What is a relative key?

Every major key shares its notes with a minor key three semitones lower: C major and A minor, G major and E minor, and so on. They have the same key signature, but a different tonal centre. The parallel key has the same tonic but the other mode, such as C major and C minor.

How is the BPM measured?

The tool builds an onset envelope from spectral flux (how quickly the spectrum gains energy, which peaks at drum hits and note attacks) and finds its strongest periodicity with autocorrelation between 50 and 220 BPM, preferring tempos near 120 BPM. Half and double values are shown because many songs can be counted either way.

Why does the tool show the tuning (A4 = … Hz)?

Not every recording is tuned to A = 440 Hz; some older records and orchestras use 442 Hz or drift because of tape speed. The analysis measures the average deviation of the notes from equal temperament and compensates for it, which also tells you how to tune your instrument to play along.

Are my songs uploaded?

No. The audio is decoded and analysed by JavaScript in your browser, so your files never leave your device. Only the first 20 minutes of very long files are analysed.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

BPM FinderFind the tempo of any song: analyze an audio file for its BPM or tap along to the beat.Scale FinderSee any music scale on piano and guitar fretboard, with notes, formula, chords and playback.Chord FinderGuitar chord charts and piano chords for every key, with notes, formulas and sound.Chromatic TunerTune any instrument or voice: detects every note from C0 to C8.432 Hz ConverterRetune any song from A=440 Hz to 432 Hz (or 444, 528…) with a precise pitch shift; save MP3 or WAV.Nightcore MakerSpeed up and pitch up any song into nightcore, add bass boost, save MP3/WAV or a cover video.Online Audio MasteringMaster songs automatically to -14 or -9 LUFS with EQ, multiband compression and a true-peak limiter.Online DJ MixerTwo-deck DJ mixer for your own audio files: BPM sync, EQ, crossfader, loops, cues and mix recording.Guitar TunerTune your guitar with your microphone, in standard or alternate tunings.Ukulele TunerTune a ukulele to GCEA, low G, baritone DGBE or D tuning by microphone.Online MetronomeKeep time with BPM control and tap tempo.Violin TunerTune your violin with the microphone: G D A E with a cents meter and reference tones.Bass TunerTune 4, 5 and 6-string bass guitars with your microphone, reference tones and drop D.Online PianoPlay a virtual piano with your mouse, touch or computer keyboard and record a WAV.Drum MachineMake beats with a 16-step drum sequencer, synthesized kits, swing and WAV export.Chord TransposerPaste a chord sheet and transpose every chord to a new key, with capo tips and aligned output.BPM to MS CalculatorNote lengths in milliseconds and Hz for any tempo: straight, dotted and triplet delay times.Note Frequency CalculatorConvert notes to Hz and Hz to the nearest note with cents, MIDI number and adjustable A4.Banjo TunerTune a 5-string banjo with your microphone in Open G, Double C, Open D and more.Interactive Circle of FifthsClickable circle of fifths with key signatures, relative minors, diatonic chords and playback.Ear TrainingInterval, chord and scale recognition drills with levels, scoring, streaks and weak-spot stats.Guitar Chord Diagram MakerDraw guitar chord box diagrams with fingers, barres and muted strings; export PNG or SVG.Guitar Fretboard TrainerLearn every note on the guitar neck: quizzes, scale and arpeggio overlays, alternate tunings, sound.Note Reading TrainerSight-reading drills for treble and bass clef: name notes with buttons, piano or MIDI, timed scores.Online GuitarPlay a virtual guitar: strum chords with your keyboard or mouse, pick notes on a real fretboard.Online SynthesizerPolyphonic browser synth with 2 oscillators, ADSR, filter, LFO, presets, MIDI and WAV recording.Tanpura DroneEndless tanpura or shruti drone in any key with Pa, Ma or Ni tuning, tempo and jawari for riyaz.Virtual Drum KitPlay a drum set with your keyboard or touch pads, then record a beat, play it back and save it.Vocal Range TestSing your lowest and highest notes to find your vocal range and closest voice type.Capo CalculatorSee the real chords your capo shapes make, or find the best capo fret and shapes for a key.Chord Progression GeneratorGenerate chord progressions by key, mode and mood, hear them on piano or guitar and export MIDI.Guitar Tab MakerWrite guitar tabs by clicking a fretboard or typing text, hear them played back, save TXT or PDF.Music Streaming Royalty CalculatorEstimate streaming royalties by platform after distributor fees and splits, or streams needed.Online LaunchpadPlay an 8x8 beat pad with drum, synth and vocal kits, loops, your own samples and WAV recording.Piano Chord ChartEvery piano chord on a keyboard diagram with notes, fingering, inversions and sound.Sheet Music MakerWrite sheet music by clicking notes or typing ABC; add lyrics and chords, play it, save PDF, MIDI or MusicXML.Singing Pitch TrainerSing into your mic and see your pitch on a piano roll against target notes, with cents and a score.Ukulele Chord ChartUkulele chord diagrams with finger numbers, several shapes, strum sound and printable charts.Backing Track GeneratorMake jam tracks from any chord progression: drums, bass and chords in any key and tempo.Camelot WheelInteractive Camelot wheel: click a key to see harmonic mixes, convert keys to Camelot and Open Key.Chord Chart MakerTurn lyrics with chords into clean printable chord sheets; transpose, add chord diagrams, export PDF.Guitar Amp SimulatorPlay your guitar through amp models, cabinet, delay, reverb and noise gate right in your browser.Music Interval CalculatorName the interval between two notes, or find the note a given interval above or below.Piano Letter Notes PlayerPaste piano letter notes or virtual piano sheets and hear them played with key highlighting.LRC Lyrics MakerMake synced .lrc lyrics: play a song, tap to timestamp each line or word, preview and download.Melody GeneratorGenerate random melodies in any key and scale over a chord progression; play and export MIDI.MIDI to Sheet MusicTurn a MIDI file into readable sheet music and download it as PDF, PNG or MusicXML.Music Theory QuizQuiz yourself on note names, key signatures, intervals, chords and scales with staff and keyboard.Polyrhythm MetronomePractise 3:2, 4:3, 5:4, 7:4 and other polyrhythms with distinct sounds and a circular visualizer.Song Chord DetectorUpload a song to detect its chords over time, follow them during playback and save a chord chart.Song Practice PlayerSlow down songs without changing pitch, transpose, A-B loop and speed up gradually as you learn.Tempo Change CalculatorConvert a BPM change to percent speed, semitone and cents pitch shift and new song length.Transposing Instrument CalculatorConvert notes and keys between concert pitch and B♭, E♭, F and A instruments, both ways.CPR Metronome110 BPM CPR compression metronome with 30:2 cycle counter, breath pauses and voice prompts.Calming Music for DogsEndless slow, soothing music for anxious dogs and cats, with sleep timer and gentle fade-out.Mindfulness BellGentle bell chimes at fixed or random intervals through the day, with quiet hours and prompts.Audio to Sheet MusicTranscribe a melody or simple piano recording into sheet music; save as PDF, MIDI or MusicXML.
See all 56 Music Theory & Instruments →