Audio Spectrum Analyzer & Spectrogram
A real-time audio spectrum analyzer and scrolling spectrogram in your browser. Visualize the frequencies in a microphone, an audio file, or a built-in tone generator — with live peak-frequency and musical-note readout. Nothing is uploaded.
How to Use
- Pick a source: your microphone for live sound, an audio file you drop in, or the built-in tone generator.
- Press Start (browsers require a click before they will play or listen to audio).
- Watch the top graph — the live spectrum — show how much energy is at each frequency right now.
- Watch the bottom graph — the spectrogram — scroll left to right, painting a history of those frequencies over time.
- Read the peak frequency and its nearest musical note, and tweak the FFT size, smoothing, and scale to taste.
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.
How it works
Any sound — a voice, a violin, a fan — is a single wiggling pressure wave. Yet your ear effortlessly hears it as a blend of pitches: a low rumble here, a bright hiss there. The mathematical tool that pulls a complicated wave apart into the individual frequencies it is made of is the Fourier transform, and the fast version your browser runs thousands of times a second is the FFT (Fast Fourier Transform). This analyzer feeds live audio into the Web Audio API’s FFT and paints the result.
The spectrum (the top graph) is one FFT frame: the horizontal axis is frequency, low on the left and high on the right, and the height of each point is how much energy the sound has at that frequency right now. A pure tone is a single spike; a rich instrument is a whole comb of spikes (its harmonics); noise is a broad smear. The spectrogram (the bottom graph) stacks those frames over time — each new vertical stripe is the latest spectrum, brightness shows energy, and as fresh stripes appear on the right the older ones scroll left, so you literally watch the sound’s frequencies evolve.
Bins, Nyquist, and the time–frequency trade-off
There is no free lunch. A larger FFT size chops the spectrum into more, narrower bins, so you can tell two nearby notes apart — but it needs more samples to do it, which means it reacts more slowly and blurs fast changes. A smaller FFT size is nimble in time but coarse in frequency. This is the time–frequency trade-off, and choosing where to sit on it is the whole art of spectral analysis. The smoothing control averages each bin with its recent past to calm the flicker, at the cost of a little responsiveness.
Why a log frequency scale
By default the analyzer draws frequency on a logarithmic axis, because that is how we hear. Each musical octave doubles the frequency — 110, 220, 440, 880 Hz are all the note A — so on a log axis those octaves are evenly spaced, matching a piano keyboard. On a linear axis the entire bottom four octaves would be crammed into the leftmost sliver while the top, where we hear little musical detail, would hog the rest. Switch between the two and watch the low notes spread out or bunch up. The peak-note readout uses the equal-tempered formula above and reports how many cents (hundredths of a semitone) the loudest frequency sits above or below the nearest note — a built-in tuner.
About this analyzer
This is a complete spectrum analyzer, spectrogram, level meter, and chromatic tuner in one page, running entirely on your device through the Web Audio API. Microphone audio and any file you open are processed locally and never leave your browser — there is no upload, no recording, and no account. It works offline once the page has loaded.
Use it to hunt down a mystery hum, check whether your headphones really reproduce the low bass, tune a guitar by ear-and-eye, watch the harmonics that give each instrument its character, or simply learn what sound looks like. To go deeper on the maths and the musical pitch behind it, read Sound, Frequency & the FFT.
About the Audio Spectrum Analyzer & Spectrogram
Use the Audio Spectrum Analyzer & Spectrogram — a free, easy tool for image, audio and file tasks. Nothing is uploaded, and you do not need an account. A real-time audio spectrum analyzer and scrolling spectrogram in your browser. Visualize the frequencies in a microphone, an audio file, or a built-in tone generator — with live peak-frequency and musical-note readout. Nothing is uploaded.
How it works
Enter what you have and read the result as it updates live. It all runs on your own device, so it is quick and private, with nothing to install.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
Is my audio uploaded anywhere?
No. Everything happens inside your browser using the Web Audio API. Microphone audio and any file you load are analyzed locally on your device and never sent to a server. Close the tab and it is gone.
What is the difference between the spectrum and the spectrogram?
The spectrum (top) is a snapshot: it shows how loud each frequency is at this instant, like the bars on a graphic equalizer. The spectrogram (bottom) is the same information drawn over time — each vertical line is one spectrum, and as new ones are added on the right the old ones scroll left, so you can see how the sound changes.
Why does the peak note sometimes read slightly sharp or flat?
The analyzer reports the nearest equal-tempered note and how many cents off the peak is. A real instrument is never perfectly in tune, and the frequency resolution is limited by the FFT size — bigger FFT size means finer frequency steps but a slower, more smeared response. Raise the FFT size for a more precise pitch reading.
What does FFT size change?
The FFT size sets how many frequency bins the spectrum is split into. A larger size gives finer frequency detail (you can tell two close notes apart) but worse time detail (fast changes blur together), and vice-versa. This trade-off between frequency precision and time precision is fundamental to all spectral analysis.
What is the highest frequency it can show?
Half your audio sample rate — the Nyquist frequency. Most devices sample at 44,100 or 48,000 Hz, so the analyzer tops out around 22 kHz, comfortably above the ~20 kHz limit of human hearing.
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
A 50/60 Hz electrical hum, a coil whine, or a fan resonance shows up as a steady bright line at a fixed frequency — read the exact value off the peak.
Tune an instrument
Play a note into the mic and read the nearest musical note plus the cents it is sharp or flat. Raise the FFT size for a precise pitch lock.
See speech and music
Watch vowels, sibilants, and the harmonic stacks of musical notes paint themselves on the spectrogram in real time.
Check a speaker or room
Sweep the tone generator and watch which frequencies your speakers reproduce and where the room rings or drops out.
Learn how sound works
Generate a pure sine versus a square or sawtooth and watch the harmonics appear — a hands-on lesson in what timbre really is.
Last updated: