Drop a track and read its musical key — measured from the notes in your own file, never looked up. The runner-up key is printed beside it with the margin between them, because a major key and its relative minor share all seven notes and that is the one ambiguity every other key finder hides. Everything runs inside your browser, the network meter below proves the zero live, and this page downloads nothing at any point, not even a library.
How this key finder works
When you choose a file, the browser's File API hands this page the bytes in memory — the file is already on your machine, so nothing travels anywhere — and your browser decodes the audio into raw samples itself. Those samples are mixed to one channel, and the analysis walks the whole recording in short frames rather than sampling a section of it, because a key is a property of the piece and not of its loudest thirty seconds. The span analysed is printed beside the result every time, never implied. Files longer than ten minutes are refused by name, because the whole recording sits in your device's memory as raw samples while it is read.
Measuring which notes are present does not need a full spectrum, so this page does not compute one. It needs the energy at sixty known frequencies — twelve pitch classes across five octaves, C2 up to B6, which is where harmony actually sits — and a Goertzel filter evaluates exactly one frequency at a time for a fraction of the cost. Those sixty readings fold into twelve bins, the twelve bins are correlated against twenty-four key profiles, and the twenty-four are sorted. What comes out is a ranking, and this page shows you the top of it rather than only its winner: the key, the runner-up, and the gap between their correlations.
What it cannot do is worth stating plainly. It assumes twelve-tone equal temperament and one key for the whole file, so a piece that modulates gets a single muddied answer — and the margin is what reveals that, because a modulating track correlates weakly against every profile rather than strongly against one. It knows nothing about modes beyond major and minor, so Dorian or Mixolydian material will be reported as the nearest of the twenty-four. It does not name a tempo, a chord progression, a genre or a time signature, because it does not measure any of them.
Frequently asked questions
Is my music uploaded anywhere?
No. Your browser opens the file with its File API and decodes the audio itself, and everything after that — the pitch-class profile, the correlations, the ranking — is JavaScript running inside this tab. The readout's network meter counts every request from the moment your file is read and stays at zero, and there is no one-time library download to footnote: this page fetches nothing at any point, so the zero has no exceptions. The methodology page shows how to verify it independently, including with your wifi switched off.
How does it decide on a key?
It counts which notes your recording actually spends its energy on, then asks which key that pattern fits. Sixty narrow filters — twelve pitch classes across five octaves — measure how much energy sits at each note across the whole track, and those readings are folded into a twelve-bin profile: how much C, how much C sharp, and so on, regardless of octave. That profile is then correlated against twenty-four published tone profiles, one per major and minor key, and the twenty-four are ranked. The profiles are the Krumhansl and Kessler probe-tone ratings from 1982, they are printed on the methodology page rather than hidden, and the number beside each key on this page is that correlation, not a confidence invented after the fact.
Why does it print a runner-up key?
Because the runner-up is the part every other key finder throws away, and it is the part that tells you whether to trust the answer. Twenty-four keys are ranked, and two of them are very often neck and neck: a major key and its relative minor contain exactly the same seven notes, so no method that counts notes can separate them cleanly. C major and A minor are the same white keys in a different order. A tool that prints C major and stops has not told you it was nearly a coin flip. This page prints the runner-up, the margin between the two correlations, and — when the runner-up is the relative key — says so by name, because that is the case where the number needs a human ear rather than a bigger number.
Why does it sometimes refuse to name a key?
Because a confident wrong key is worse than no key. Three separate things make this page refuse, and they catch different failures. First, it checks how evenly the twelve pitch classes carry energy: if the profile is nearly flat there is no tonal centre to find, and percussion, noise, speech and silence all look like this. That test exists because correlation alone is not enough — with only twelve bins a flat profile can still score highly against some key by chance, and an earlier version of this page named a key for white noise on exactly that mistake. Second, if no key profile correlates above 0.5 the page names none, which is what a clip too short to build a profile from looks like, or a recording that changes key partway through and produces one muddled profile rather than two clean ones. Third, if a key does win but its margin over the runner-up is under 0.02, both are printed and it is called too close to call rather than decided for you. None of the three is an error; each is the measurement reporting what it actually found.
Which audio formats work here?
WAV and MP3 are the headline pair, and the full accept list — M4A/AAC, OGG and Opus, FLAC, AIFF and WebM audio — is simply every audio format your browser can decode itself. That is the whole selection rule: decoding is done by the browser's own audio engine, so this page never ships or downloads a decoder, and a format the browser cannot open is refused by name rather than attempted. Video files are not accepted here on purpose — this page is about a song's key, and the audio track of a video belongs in one of the converters first.