Audio Spectrum Analyzer & Spectrogram

A real-time audio spectrum analyzer and scrolling spectrogram in your browser. See the frequencies in your microphone, an audio file or a built-in tone, with the peak frequency, nearest musical note, cents and level read out live. Nothing is uploaded.

Analyzer Media & Files Updated Oct 16, 2026
Learn how this works
How to Use
  1. Pick a source: the built-in tone, your microphone for live sound, or an audio file you choose.
  2. Press Start; browsers only play or listen to audio after a click.
  3. Watch the top graph, the spectrum: how much energy there is at each frequency right now.
  4. Watch the bottom graph, the spectrogram: the same information scrolling as a history, newest on the right.
  5. Read the peak frequency, nearest note, cents and level, and change the FFT size, smoothing, frequency scale, range and colours to suit what you are looking at.
Pick a source and press Start. Audio stays on your device.
Try it with a sample
Spectrum — energy at each frequency, right nowlog scale
Spectrogram — those frequencies over time (newest on the right)low → high energy
Peak frequency
— Hz
Nearest note
—
Off by
— cents
Level
— dB
Sample rate
— Hz
Resolution
— Hz/bin

Tip: try the Tone source with a Square wave and watch the stack of odd harmonics appear — that is exactly why a square wave sounds buzzy and a sine wave sounds pure. The microphone needs your permission; nothing is recorded or sent anywhere.

Worked Example

The built-in tone. Press Start with the default 440 Hz sine at level 25. The level slider is multiplied by 0.6, so the sine’s amplitude is 0.25 × 0.6 = 0.15 and its RMS level is 20 × log₁₀(0.15 ÷ √2) = −19.5 dBFS, which is what the Level readout shows. At 48,000 Hz with the default 4,096-point FFT the bins are 48,000 ÷ 4,096 = 11.72 Hz apart, so 440 Hz sits between bin 37 (433.6 Hz) and bin 38 (445.3 Hz); fitting a parabola through the three highest bins puts the peak back at 439.8 Hz in our test in Edge, which reads as A4, −1 cent.

A square wave instead. Switch the waveform to square and a comb of peaks appears at the odd harmonics: 1,320, 2,200 and 3,080 Hz. In an ideal square wave they have 1/3, 1/5 and 1/7 of the fundamental’s amplitude, that is −9.5, −14.0 and −16.9 dB, which is why it sounds buzzy while the sine sounds pure. A sawtooth adds the even harmonics too.

The common mistake: a small FFT for a low note. At 1,024 points the bins are 46.9 Hz wide, so a guitar’s low E at 82.4 Hz falls between the first and second bins and cannot be pinned down; the peak readout jumps about or locks onto a louder harmonic. Raise the FFT size to 16,384 (2.93 Hz bins) or 32,768 (1.46 Hz) for low notes, and accept that the display reacts more slowly.

Show Work

Tonesine, 440 Hz, level 25 × 0.6 ÷ 100 = amplitude 0.15
Level (RMS)20 × log₁₀(0.15 ÷ √2) = −19.5 dBFS
Bin width48,000 Hz ÷ 4,096 points = 11.72 Hz; 2,048 bins up to 24,000 Hz
Where 440 Hz falls440 ÷ 11.72 = bin 37.55, between 433.6 and 445.3 Hz
Peakparabola through the highest bin and its two neighbours = 439.8 Hz (measured in Edge)
Note69 + 12 × log₂(439.8 ÷ 440) = 68.99 = A4, −1 cent
Time per analysis4,096 ÷ 48,000 Hz = 85 ms of sound

Formulas

Frequency per bin
Δf = sample rate ÷ FFT size
48 kHz with a 4,096 FFT gives 11.7 Hz bins
Highest frequency
f_max = sample rate ÷ 2
The Nyquist frequency; there are FFT size ÷ 2 bins below it
Time per analysis
T = FFT size ÷ sample rate
Finer frequency costs time: 32,768 points is 0.68 s at 48 kHz
Frequency to note
n = 69 + 12 × log₂(f ÷ 440)
Rounded to the nearest note; the rest × 100 is cents
Level
dBFS = 20 × log₁₀(RMS)
A full-scale sine is −3.0 dBFS RMS

From Fourier to Your Browser

Any sound is one wiggling pressure wave, yet the ear hears it as a blend of pitches. Fourier analysis splits a wave into the sine waves it is made of, and the fast Fourier transform, published by James Cooley and John Tukey in 1965, made that cheap enough to run thousands of times a second. The Web Audio API’s AnalyserNode does it for this page: it takes the latest block of samples, applies a Blackman window to soften the block’s edges, runs the FFT, smooths each bin over time (0.8 by default, the smoothing control here) and converts the result to decibels, mapping −100 to −30 dB onto the 0 to 255 values the graph draws.

The frequency axis is logarithmic by default because that is how we hear: each octave doubles the frequency, so 110, 220, 440 and 880 Hz are all the note A and sit evenly spaced, like a piano keyboard. On a linear axis the bottom octaves would be squeezed into the leftmost sliver. The spectrogram, a picture of frequency against time with colour for loudness, is how speech scientists read vowels and how engineers spot a hum that comes and goes.

About This Tool

This is a spectrum analyser, scrolling spectrogram, level meter and note reader in one page. It analyses a built-in tone, your microphone or an audio file with the browser’s own FFT, and lets you trade frequency detail against speed with FFT sizes from 1,024 to 32,768 points, a smoothing control, a log or linear axis, a maximum frequency and four colour schemes.

Everything runs on your device through the Web Audio API: microphone audio and files are analysed locally and never recorded or uploaded, and it keeps working offline once the page has loaded. For the maths behind it, read Sound, Frequency & the FFT.

It is for musicians, students, audio hobbyists hunting a hum, and anyone curious about what sound looks like.

Related tools: Tone Generator, Tuner & Hearing Test, Audio System EQ Tuner & RTA, and Audio Converter.

Frequently Asked Questions

Is my audio uploaded anywhere?

No. Everything happens inside your browser with the Web Audio API. Microphone audio and any file you open are analysed on your device and never sent anywhere, and the microphone is not played back through your speakers, which avoids feedback.

What is the difference between the spectrum and the spectrogram?

The spectrum (top) is a snapshot of how loud each frequency is at this instant, like the bars of a graphic equaliser. The spectrogram (bottom) draws one such snapshot per frame as a vertical line of colour and scrolls them left, so you can see how the sound changes over time.

Why does the peak note read slightly sharp or flat, or an octave out?

The readout is the nearest equal-tempered note to the loudest frequency, and the FFT size limits how finely that frequency is known: at 48 kHz a 4,096-point FFT has bins 11.7 Hz apart, refined by interpolation. For many instruments the loudest partial is not the fundamental, so a low note can read as the octave above. Raise the FFT size for low notes.

What does the FFT size change?

It sets how many samples each analysis uses. At 48 kHz, 1,024 samples is 21 ms of sound with 46.9 Hz bins, while 32,768 samples is 0.68 s with 1.46 Hz bins. Bigger sizes separate close notes but blur fast changes; smaller sizes react quickly but cannot tell nearby frequencies apart. That trade-off is fundamental to all spectral analysis.

What is the highest frequency it can show?

Half the sample rate, the Nyquist frequency. Most devices run at 44,100 or 48,000 Hz, so the analyser goes up to 22,050 or 24,000 Hz, above the roughly 20 kHz limit of human hearing; the “Full range” setting shows up to 22,050 Hz.

How do I use the Audio Spectrum Analyzer & Spectrogram?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Find a hum or whine

Mains hum shows as a steady line at 50 or 60 Hz and its harmonics; read the exact peak frequency.

Tune an instrument

Play a note into the microphone and read the note and cents; use 16,384 or 32,768 points for low strings.

See speech and music

Watch vowels form stacks of harmonics and “s” sounds spread above 4 kHz on the spectrogram.

Learn what timbre is

Switch the 440 Hz tone from sine to square and watch odd harmonics appear at 1,320, 2,200 and 3,080 Hz.

Last updated: