📊

Audio Spectrum Analyzer

Real-time FFT spectrum from your microphone with log / linear frequency axis, configurable FFT size, peak hold, A and C weighting, top-5 peak detection, and one-click PNG screenshot export. 100% browser-based — no audio leaves your device.

100% browser-based — your microphone audio never leaves your device. No recording, no upload.
⏸ FROZEN
Peak frequency
Peak magnitude
RMS level
Dynamic range
FFT bin width
Sample rate

Top 5 spectral peaks

# Frequency Magnitude Musical note
Start listening to detect peaks.

Controls

Tip: lower the smoothing to see fast transients; raise it for more stable peak readings. Use A-weighting for loudness-relevant displays, C-weighting for low-frequency analysis, Z for raw measurement.

Share or embed this tool

Free to use on your own website — WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


About FFT Spectrum Analysis & Weighting

A real-time spectrum analyzer shows you how acoustic energy is distributed across frequency. Where a waveform shows you what your microphone hears as a function of time, a spectrum shows you what it hears as a function of frequency. This online spectrum analyzer works entirely in the browser — no software to install — making it a convenient browser spectrum analyzer for identifying tonal noise (mains hum at 50/60 Hz and its harmonics, fan whine, transformer buzz), checking instrument tuning, calibrating loudspeakers and PA systems, measuring background noise for environmental assessments, or simply seeing your voice on screen. To generate a known reference signal to sweep against the analyzer, use the online tone generator alongside this tool.

How the FFT works (briefly)

The Fast Fourier Transform (FFT) decomposes a block of N time-domain samples captured from your microphone into N/2 frequency-domain bins, each representing the energy in a narrow band of width sample_rate / N. This microphone FFT pipeline is what drives the live display: larger N gives finer frequency resolution (e.g., 8192-bin FFT at 48 kHz gives ~5.86 Hz per bin) but slower time response because a larger block of audio must accumulate before each new frame is computed. Smaller N gives coarser frequency resolution but quicker reaction to transients. The Web Audio API’s AnalyserNode applies a Blackman window function by default before computing each frame, which reduces spectral leakage — the smearing of energy from a single tone across adjacent bins that would otherwise appear with a plain rectangular window. This analyzer’s default 8192-point FFT strikes a balance suitable for most music and speech work.

Logarithmic vs linear frequency axis

Human pitch perception is roughly logarithmic — each doubling of frequency is heard as one octave, so A2 (110 Hz) to A3 (220 Hz) spans the same musical distance as A5 (880 Hz) to A6 (1760 Hz). A linear-axis spectrum crams the entire bass and mid range into the leftmost few percent of the screen while the unused 10–20 kHz region eats up most of the width. A logarithmic axis gives equal pixel-width to each octave, which is almost always what musicians, audio engineers, and acousticians want. Use linear only when you specifically need to see fine harmonic spacing at high frequencies (e.g., sidebands around a 5 kHz carrier, or aliasing artifacts near Nyquist). You can switch between the two in the Controls panel at any time without restarting the analyzer.

A-weighting and C-weighting

The human ear is not equally sensitive at all frequencies — at low and high extremes you need much more sound pressure level (SPL) to perceive the same loudness. Standards bodies such as IEC 61672 defined frequency-weighting filters that approximate this equal-loudness perception:

  • A-weighting heavily attenuates frequencies below ~500 Hz and above ~10 kHz, roughly matching the human ear’s response at conversational levels (~40 phon). dB(A) is the standard for occupational noise exposure (OSHA, EU Noise at Work Directive), environmental noise monitoring, and most consumer “loudness” measurements. It is the most widely used weighting in noise regulations worldwide.
  • C-weighting is nearly flat from 30 Hz to 8 kHz, only rolling off at the extremes. Used for high-level impulse noise, low-frequency machinery analysis, peak level measurements, and any case where sub-bass content must be preserved in the reading.
  • Z-weighting (sometimes called “flat” or “linear weighting”) applies no filter — you see the raw FFT magnitude. Use this for technical acoustics work where you want unmodified physical energy levels across the audible spectrum.

Peak hold and smoothing time constant

Peak hold draws the highest value each frequency bin has reached recently, with a configurable decay rate. It makes brief transients visible — a quick handclap, a single drum hit, a HVAC blower start-up — that would otherwise vanish before you could read them. “Infinite” hold never decays, useful for capturing the maximum spectral extent of a recording or live performance. Slow decay matches the standard peak indicator on professional PA consoles. The smoothing time constant is the Web Audio API’s time-averaging coefficient (0 = no smoothing, 1 = never updates). Lower values react faster to transients; higher values give a more stable, readable trace for slow-varying signals like room noise or sustained tones. For room noise identification alongside this analyzer, try the noise frequency analyzer which is optimised specifically for diagnosing HVAC and electrical interference sources.

Frequently Asked Questions

What FFT size should I use?
For typical music or speech monitoring, 8192 is the sweet spot — about 5.86 Hz resolution at 48 kHz, updating at ~6 frames per second of fresh data. Use 16384 or 32768 for precise low-frequency work (instrument tuning, room modes below 100 Hz where you need sub-1 Hz resolution). Use 1024 or 2048 for fast time response — drum detection, percussion analysis, anything where transients matter more than frequency precision. Remember: doubling FFT size halves the bin width but also halves the time resolution.
Why does my display look much lower in dB than I expect?
The displayed dB values are dBFS — decibels relative to full scale of the audio API (digital 0 dBFS = 1.0 sample value). They are NOT absolute SPL (sound pressure level). 0 dBFS would only show if you saturated the microphone preamp. Typical conversational speech with a normal mic gain settles around −30 to −20 dBFS. To get true SPL you'd need a calibrated reference microphone and a known acoustic source — this is browser-side software, so it can't be calibrated for absolute level.
What does A-weighting actually do mathematically?
A-weighting applies a frequency-dependent gain to each bin matching the inverse of the human-ear sensitivity curve at ~40 phon (quiet listening). The transfer function is a 4-pole biquad approximation: R_A(f) = 12194² · f⁴ / ((f² + 20.6²)·√((f² + 107.7²)(f² + 737.9²))·(f² + 12194²)), with a +2.0 dB normalization at 1 kHz. Roughly, it cuts ~26 dB at 50 Hz and ~10 dB at 10 kHz. C-weighting is similar but uses only the two outer poles, giving a flat response in the middle and only attenuating the extreme low/high.
Why is the spectrum noisy when nothing is playing?
You're seeing the noise floor of your microphone, preamp, and ADC — typically −60 to −90 dBFS depending on hardware. Cheaper microphones and laptop mics floor around −60 dBFS (lots of visible hash). Studio condensers with cleaner preamps can floor below −90 dBFS (a flat green line). Raising the "Min dB" floor in the controls cuts the displayed noise visually but doesn't change the underlying signal. To genuinely reduce mic noise, use a better mic, get closer to the source, or post-process with noise reduction.
Can I use this for room acoustics measurement?
For a quick look at frequency response, yes — play a known test signal (pink noise from any tone generator, sweep, or music) and watch how the room shapes it. For real acoustic measurement you'd want a calibrated reference microphone, a known excitation source, and an impulse-response measurement (sweep or MLS). This tool shows the magnitude spectrum; it does not deconvolve room response from source response. For dedicated room-mode and RT60 work see the calculators in the Acoustic Physics category.
Does the screenshot export include the cursor readout and stats?
The PNG export captures the spectrum canvas only — the frequency axis, dB axis, grid, current spectrum, and peak-hold trace (if enabled). The cursor readout, top-peaks table, and stat cards are HTML and are not included. If you need them in the screenshot, take a regular screen capture (Win+Shift+S on Windows, Cmd+Shift+4 on Mac). The canvas-only PNG is meant for embedding in reports and documentation.
Can multiple browser tabs use the microphone at the same time?
On most operating systems, multiple browser tabs can each open their own microphone stream simultaneously (each gets its own copy of the same audio device). On some platforms (older iOS, certain Linux PulseAudio configurations) only one tab gets exclusive access. If a second tab can't start, close the first tab's mic stream or restart the browser. This analyzer always releases the microphone when you press Stop, navigate away, or close the tab (via the beforeunload event).
What windowing function does this analyzer use, and does it affect accuracy?
The Web Audio API’s AnalyserNode applies a Blackman window to each FFT frame before transforming. Windowing reduces spectral leakage — the artefact where energy from a single sustained tone bleeds into neighbouring bins because the analysis block does not start and end at exactly the same phase. The Blackman window has good sidelobe suppression (−58 dB), meaning a strong tone at 440 Hz will not create a false spike at 445 Hz. The trade-off is a slight widening of the main lobe (reduced frequency sharpness). You cannot change the window type in this tool, but for most practical uses — tuning checks, noise floor assessment, voice monitoring — Blackman is an appropriate default.
How do I identify mains hum and its harmonics on the spectrum?
Mains electrical interference appears as a cluster of narrow spikes at multiples of your power-line frequency: 50 Hz, 100 Hz, 150 Hz, 200 Hz… in 50 Hz countries (Europe, Asia, Africa); or 60 Hz, 120 Hz, 180 Hz, 240 Hz… in 60 Hz countries (North America, Japan). Set the FFT size to 8192 or larger for the sub-2 Hz bin resolution needed to clearly resolve 50 Hz from 60 Hz, and switch to Z-weighting so A-weighting doesn’t suppress the bass. If you see spikes only at even harmonics the source is likely a transformer; odd harmonics suggest clipping or a switching supply. For a dedicated interference diagnosis workflow, the noise frequency analyzer labels common interference patterns automatically.
How does this browser-based RTA compare to a dedicated hardware or software spectrum analyzer?
For listening-room checks, voice monitoring, and educational use this tool is genuinely useful. The key limitations versus dedicated real-time analyzers (RTAs) are: (1) no absolute SPL calibration — readings are dBFS, not dB(SPL), so you cannot directly compare levels against acoustic standards without a known reference; (2) microphone frequency response is uncompensated — cheap laptop mics roll off heavily above 8 kHz and below 100 Hz, distorting the shape of the spectrum; (3) latency and frame rate are constrained by browser audio scheduling, limiting time resolution compared to native apps. For OSHA/environmental compliance measurements you need a Type 1 or Type 2 sound level meter. For studio work a calibrated measurement microphone (e.g., Dayton Audio EMM-6) and dedicated software (REW, Smaart) will give better results. This tool is best used as a fast, no-install visual aid.