Realtime Spectrum Analyzer
Watch a live Hann-windowed FFT of the microphone, from 512 to 8192 points, on a linear or log frequency axis.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
Result
About this tool
Start asks for the microphone and connects it to an AnalyserNode. Every animation frame copies the time-domain samples with getFloatTimeDomainData and runs this site’s own FFT, after multiplying the frame by a Hann window. The size control accepts 512, 1024, 2048, 4096, and 8192 points. Changing it updates analyser.fftSize before the next frame. Magnitude in each bin is the hypotenuse of the real and imaginary parts, divided by the FFT size. The horizontal axis is either linear or logarithmic in frequency. A grid can be drawn on top.
With the peak box checked, the caption uses the bin from index 1 upward with the largest magnitude. Frequency is that index times the audio context’s sample rate, divided by the FFT size. The level is that magnitude in dBFS. Bin 0 is left out of the search, so a DC offset does not become the reported peak. At 2048 points and a 48000 Hz context, bin 1 is about 23.4 Hz and the top bin sits near 24 kHz.
The node’s smoothingTimeConstant is set to 0.72. That constant would blur the browser’s built-in frequency data. This page never reads that data. It transforms a fresh waveform every frame, so the picture is one window at a time. Nothing is recorded to a file, and Stop closes the microphone. A file spectrogram over time is the separate audio spectrogram tool. A fan, a voice, or mains hum in the room is real energy in the plot.
Example. A 2048-point Hann FFT of the live microphone buffer becomes one magnitude frame. The peak frequency is bin index times sample rate divided by 2048.
Limit. The analyzer never writes an audio file. FFT sizes are only 512, 1024, 2048, 4096, and 8192. The AnalyserNode smoothing constant is set to 0.72, but the picture is drawn from a fresh time-domain FFT, so that constant does not filter the bars.
What is a real-time spectrum analyzer in the browser?
Start asks for the microphone, then each animation frame copies the time-domain buffer and runs a Hann-windowed FFT. You can switch among 512, 1024, 2048, 4096, and 8192 points, and between a linear and a logarithmic frequency axis, while the graph is moving.
How is the peak frequency chosen?
With the peak box on, the caption uses the bin from 1 upward with the largest magnitude. Frequency is that bin index times the audio context sample rate divided by the FFT size, and the level is the bin magnitude converted to dBFS. Bin 0 is skipped.
Does it record or smooth the spectrum?
Nothing is written to a file, and the microphone stops when you press stop. The node’s smoothingTimeConstant is 0.72, which would affect the browser’s own frequency data. This page reads the waveform and computes its own FFT, so the drawing is one window at a time.