Make a Spectrogram From Audio

A spectrogram is a picture of sound: time runs across the bottom, frequency up the side, and the colour at each point is how much energy sits at that pitch at that moment. It shows you things a waveform cannot — the mains hum sitting at 50 or 60 Hz, the harmonic stack that makes a voice sound like that voice, the shelf where an MP3 encoder threw the top octave away, a bird call you would never pick out by ear. Drop in a file, drag across the part you care about, and you get an image of it. Turn the axes on and it is an analysis tool with frequency and time labelled and a decibel scale beside it; turn them off and you get an edge-to-edge square you can print. Everything happens in your browser, so the file never leaves your machine.

How to Make a Spectrogram From Audio

  1. 1

    Add your file

    Drop an audio file onto the page, or click to browse. WAV, MP3, M4A, OGG and FLAC all work, and nothing is uploaded.

  2. 2

    Select the region

    Drag across the waveform to choose the part you want to see. A short selection gives you detail; press Whole file to take in the entire recording at once.

  3. 3

    Choose how it looks

    Pick an aspect ratio — 1:1 for a square, 16:9 for a slide, 9:16 for a story — and one of six colour palettes. Switch the frequency axis between logarithmic, which matches how you hear pitch, and linear, which matches how the maths works.

  4. 4

    Turn the axes on or off

    With them on you get a labelled grid, frequency and time markings and a decibel legend. With them off the spectrogram fills the whole frame with no chrome at all.

  5. 5

    Export a PNG

    Download at up to 4,096 pixels on the long edge. The aspect ratio you picked is the aspect ratio you get, axes or no axes.

How it works

This is a short-time Fourier transform, not a model. The selected region is mixed to mono, cut into overlapping windows, and each window is multiplied by a Hann taper and passed through a radix-2 fast Fourier transform — 1,024 to 8,192 points, depending on the Detail setting. That yields the energy in every frequency band for every instant, which is converted to decibels relative to the loudest point in the selection and mapped onto a colour ramp. The one genuine trade-off in the whole tool is the window length: a long window resolves pitch finely and time coarsely, a short one does the reverse, and no amount of processing gets you both at once. That is the uncertainty principle, not a limitation of the implementation, which is why the control is exposed rather than guessed at for you.

Credits

The research this tool runs on, credited in full — with BibTeX and licence notices — on the credits page.

  • Viridis, Magma and Inferno

    CC0-1.0 (public domain dedication)
    Nathaniel J. Smith and Stéfan van der Walt. 2015. A Better Default Colormap for Matplotlib. SciPy 2015. Viridis additionally credited to Eric Firing.Read the paper

Supported formats

WAV, MP3, M4A, AAC, OGG and FLAC. Files are decoded by your browser, so anything it can play will work here. The spectrogram is exported as a PNG image, at up to 4,096 pixels on the long edge.

Frequently asked questions

Is my audio uploaded anywhere?
No. Everything runs inside your browser using the Web Audio API, so the file never leaves your device. You can prove it: load the page, turn off your Wi-Fi, and the tool still works.
What is a spectrogram actually showing me?
Three things at once. Horizontal position is time, vertical position is frequency, and colour is loudness at that frequency and moment. A steady tone shows up as a horizontal line, a drum hit as a vertical stripe across many frequencies, and a voice as a stack of evenly spaced horizontal lines — the fundamental at the bottom and its harmonics above it — that bend as the pitch moves.
Can I tell whether an MP3 was re-encoded from a lossy file?
Often, yes, and this is one of the most common reasons people reach for a spectrogram. Lossy encoders discard everything above a cutoff, which leaves a hard horizontal edge with nothing but black above it — typically around 16 kHz for a 128 kbps MP3 and 19 to 20 kHz at higher rates. A file claiming to be lossless that shows that shelf was transcoded from a lossy source at some point. Set the frequency axis to linear and the limit to Full range to see it most clearly, since a logarithmic axis compresses the top octave where the evidence is.
Should I use the logarithmic or linear frequency axis?
Logarithmic for anything musical or spoken, because it matches hearing: each octave takes the same vertical space, so harmonics are evenly stacked and low-frequency detail is not crushed into a sliver at the bottom. Linear for technical work — spotting an encoder cutoff, checking a sample rate, or looking at anything where the absolute spacing of frequencies matters more than the musical relationship between them.
What does the Detail setting change?
The length of the analysis window, in samples. A 1,024-point window pins down when things happened and blurs what pitch they were, which suits drums and speech consonants. An 8,192-point window separates close harmonics cleanly but smears a snare hit across time. 2,048 is a reasonable default for most material, and it is worth trying two settings on the same selection to see the trade in action.
What does Dynamic range do?
It sets how far below the loudest moment in your selection still gets colour. At 80 dB you see the noise floor, the room tone and the tail of every reverb; at 40 dB everything quiet drops to black and only the prominent content remains. Lower it for a cleaner-looking image, raise it to hunt for something faint.
How long a selection can I use?
Five minutes at a time on the free tier, and 15 minutes of audio per day across all your spectrograms. The limit is on the region you select, not the file you load, so you can pull a 30-second window out of an hour-long recording without it counting as an hour. Changing the palette, aspect ratio, axes or dynamic range re-draws from the analysis already done and costs nothing.
Does this use AI?
No, and there is nothing here for it to do. A spectrogram is a fast Fourier transform — exact, deterministic maths that has been the standard tool for looking at sound since the 1960s. There is no model making a judgement about your audio, which is the point: what you see is what is in the file. Audio Magic does use AI where it genuinely helps, such as Whisper for transcription and Demucs for separating stems, both running on your own device.
Do I need an account?
No. The free tools work straight away with no sign-up, up to 15 minutes of audio per tool per day. An account is only needed if you subscribe to remove the limit.
Is it free?
Yes. Every tool on this page is free to use, with a daily limit on total audio processed. There is no watermark and no trial period.

Other free audio tools