Audio Spectrum Analyzer - Real-Time FFT from Your Mic

See sound as a live frequency spectrum: FFT bars, peak frequency, and the nearest musical note, straight from your microphone.

Press Start and allow microphone access. Whistle, play an instrument, or let the room speak — the analyzer shows where the energy sits and names the strongest frequency. Nothing is recorded or uploaded.

Audio Spectrum Analyzer - Real-Time FFT from Your Mic
See sound as a live frequency spectrum: FFT bars, peak frequency, and the nearest musical note, straight from your microphone.
Peak frequency
— start the microphone to measure
Frequency resolution
23.44 Hz
Analysis window
42.67 ms
Frequency bins
1,024

Frequency resolution = sample rate ÷ FFT size; analysis window = FFT size ÷ sample rate; the FFT yields FFT size ÷ 2 usable bins up to half the sample rate.

Resolution shown for a nominal 48,000 Hz sample rate; once the microphone starts, the readout uses your device's actual rate.

About this real-time spectrum analyzer

A spectrum analyzer turns sound into a picture: the horizontal axis is frequency, the vertical axis is level, and every vertical bar shows how much energy your microphone is picking up in one narrow frequency band. Under the hood, an AnalyserNode runs a Fast Fourier Transform (FFT) on the incoming audio many times per second. The FFT size you choose sets the fundamental trade-off of all spectral analysis: a larger FFT divides the spectrum into finer slices (better frequency resolution) but needs a longer stretch of audio per frame (worse time resolution). At a 48,000 Hz sample rate, a 2,048-point FFT resolves about 23.4 Hz per bin and reacts within roughly 43 ms, while an 8,192-point FFT sharpens resolution to about 5.9 Hz per bin at the cost of a 171 ms window that smears fast transients. Pick small for drums and speech, large for tuning and bass work. What can you actually do with it? Room acoustics is the classic use: play a song or pink noise through your speakers and watch the spectrum. A stubborn mountain in the 40 to 120 Hz region that grows in corners is a room mode — standing waves set by your room's dimensions — and moving the speakers or the listening position visibly flattens it. Live engineers use analyzers for feedback hunting: when a PA starts to ring, the feedback frequency shows up as a thin, steadily climbing spike, and the peak readout hands you the number to pull down on a graphic EQ before the squeal takes over. Musicians can read harmonics directly. Play a single guitar note and you will see the fundamental plus a ladder of overtones at integer multiples — an A at 110 Hz puts spikes near 220, 330, and 440 Hz — which is a great way to understand timbre, spot fret buzz energy, or check that a piano string's partials are where they should be. The peak readout converts the strongest frequency into the nearest equal-tempered note with its offset in cents, so the analyzer doubles as a rough chromatic tuner for whistling, singing, and sustained instruments. The Freeze button holds the current frame so you can inspect a moment without the display dancing away, and the analyzer applies modest smoothing between frames so the bars are readable rather than frantic. Audio processing such as echo cancellation and noise suppression is disabled on the microphone stream, since those helpers deliberately reshape the spectrum you are trying to observe. Everything runs locally in your browser — the microphone signal is analyzed in memory and never recorded, stored, or transmitted.

Reading the spectrum: worked examples

Typical things you will see, with realistic numbers at a 48,000 Hz sample rate.

You analyzeWhat the display showsInterpretation
A whistled noteOne clean spike, e.g. peak 1,047 Hz — C6, with almost no harmonicsWhistles are nearly pure sine tones, which is why they make great tuner tests.
An open low E on guitar (82.4 Hz)Spikes near 82, 165, 247, and 330 HzThe harmonic ladder at integer multiples of the fundamental is what gives the guitar its timbre.
PA on the edge of feedbackA thin, persistent spike climbing at one frequency, e.g. 2,510 HzFreeze the display, read the peak, and cut that band on the EQ before it rings audibly.
Music playing in a small untreated roomA broad bump around 45 to 60 Hz that grows near wallsA room mode: for a 4 m room the first axial mode lands near 43 Hz (343 ÷ 2 × 4).
Silence with FFT size 8,192A low noise floor; resolution readout about 5.9 HzLarge FFTs reveal narrowband hums — mains hum shows at 50 or 60 Hz and its multiples.

How to use the spectrum analyzer

  1. Press Start microphone and allow access when the browser asks; the bars begin moving immediately.
  2. Choose an FFT size: 2,048 for fast-moving material, 4,096 as an all-rounder, 8,192 for precise low-frequency work.
  3. Make sound — play music, an instrument, or test tones — and read the peak frequency and nearest note.
  4. Press Freeze to hold an interesting frame for inspection, then Resume to continue.
  5. Press Stop when finished; the microphone stream is fully released.

Spectrum analyzer FAQ

What does the FFT size actually change?
It sets how many samples each analysis frame uses. Frequency resolution equals the sample rate divided by the FFT size, so at 48,000 Hz an FFT of 2,048 gives bins about 23.4 Hz wide while 8,192 narrows them to about 5.9 Hz. The price is time: bigger FFTs average over a longer window, so fast events look smeared.
Why does the peak readout jump around on music?
Real music constantly shifts which frequency is loudest — kick drum one moment, vocal the next. For a steady readout, analyze a sustained single source such as a held note, a whistle, or a test tone. The Freeze button is the other option: it holds one frame so you can read it calmly.
Can I use this as an instrument tuner?
For sustained, reasonably pure tones, yes — the peak is converted to the nearest note and cents offset. For low instrument strings, switch to FFT 8,192 first: at 48,000 Hz the roughly 5.9 Hz bins are close to a semitone at bass frequencies, which is the limit of a plain FFT peak reading. A dedicated tuner interpolates further.
How do I find a feedback frequency with it?
Bring the system to the verge of ringing, watch for the thin spike that keeps rising while everything else dances, freeze the display, and read the peak frequency. Common culprits in small PA setups are 250 to 500 Hz (boomy rooms) and 2 to 4 kHz (vocal mics pointed at wedges). Cut a narrow band there and re-test.
Why can I not see anything above 20 kHz or so?
An FFT can only report frequencies up to half the sample rate (the Nyquist limit) — 24,000 Hz for a 48,000 Hz device. Most microphones and voice-oriented capture chains roll off well before that anyway, so the useful top end from a laptop mic is typically 16 to 20 kHz.
Is my microphone audio recorded or sent anywhere?
No. The stream goes straight into an analyser node in your browser, which computes magnitudes and immediately discards the audio. Nothing is saved, and stopping the analyzer releases the microphone entirely — the browser's recording indicator turns off.