Audio Waveform Viewer

Every peak at every zoom, plus the spectrum.

  • True peaks at any zoom
  • Spectrogram
  • Stays on device
A small round white speaker on a light wooden table, with a long white ribbon curling in soft waves across the tabletop beside it

The guide

A Waveform Should Never Hide a Peak, and Most Pictures of Sound Quietly Do

A screen has a thousand columns and a song has millions of samples, so every waveform is a summary. Draw the lowest and highest sample of each column and the summary stays honest.

  • -6.02 dBFS peak of a sine that reaches half of full scale
  • 3.01 dB how far the RMS of a sine sits below its peak
  • 7,938 samples per column: 3 minutes at 44.1 kHz on 1,000 pixels
  • 23.4 Hz spacing of frequency bins for a 2048-sample window at 48 kHz
Read the full guide Fold the guide 7 min · 14 sources

A waveform looks like the most literal picture of sound there is. It is the signal plotted against time, the same graph an oscilloscope traces for a voltage. Yet almost every waveform you have seen on a screen is not the signal at all. It is a summary, and summaries can lie.

The reason is simple arithmetic. Digital audio is a list of samples, measurements of the signal taken tens of thousands of times a second. Three minutes of music at 44.1 kHz is 7,938,000 samples in each channel. Stretch that across a window 1,000 pixels wide and every column of pixels has to stand for 7,938 samples. Something has to decide what those 7,938 numbers look like as one vertical line of colour.

What a column of pixels has to say

The careless answer is to pick one sample per column and ignore the rest. It is fast, it is what many quick viewers do, and it is wrong in a specific way. A click from a bad edit, a single sample knocked to full scale by a glitch, or the first few clipped samples of a loud drum hit can each be one sample wide. Keep one sample in 7,938 and the odds of drawing that click are about one in 7,938. The picture looks calm while the file is not.

A picture that drops samples is not a rougher version of the truth. It is a different signal, one in which the click never happened.

The honest answer is to give each column two numbers: the lowest sample in it and the highest. Draw a line from one to the other and every sample in the column lies on that line. A single spike stretches its column all the way to the spike. The column cannot show where inside its span the spike sat, but it cannot hide that it happened.

Finding the minimum and maximum for every column on every zoom would mean rescanning millions of samples each time the view moves. The usual trick is to scan once and store the results at several scales. Blocks of 16 samples get a minimum and maximum each; pairs of those blocks are merged into blocks of 32, then 64, and so on until one block covers the whole file. Merging is exact, because the smallest of two minimums is the minimum of both blocks. Any zoom can then be drawn from the nearest scale in a few thousand steps. The whole store takes about a quarter as many numbers as the audio itself.

Zoom far enough in and the columns outnumber the samples. At that point the summary is no longer needed, and the samples themselves can be drawn as points joined by straight lines. That is still a choice of picture: the real signal between two samples is smooth, and it can rise above both of them. So a sample peak is the largest stored value, not necessarily the loudest moment of the sound once it is turned back into a wave.

Full scale, levels and the faults near it

Digital audio has a hard ceiling, the largest number the format can store. Levels are measured against it in decibels relative to full scale, written dBFS. Full scale itself is 0 dBFS and every quieter peak is negative. A signal that reaches half of full scale peaks at -6.02 dBFS, because twenty times the base-ten logarithm of one half is -6.02.

Peak level tells you how close a file came to the ceiling. It says little about how strong the signal is over time, which is what the root mean square measures: square every sample, take the mean, take the square root. For a sine wave the ratio between the two is fixed. Its RMS is the peak divided by the square root of two, which puts it 3.01 dB below the peak.

There is a wrinkle worth knowing. Some standards, AES17 among them, define the scale so that a full-scale sine reads 0 dBFS as RMS, which moves every RMS reading up by about 3 dB. Other engineers use the plain mathematical definition. Neither is wrong, but a number without its convention is half a number, so a careful report states which one it used.

Clipping is what happens when a signal asks for more than the system can give. The top of the wave is cut flat at the limit, and a sine starts to look like a square wave. In a digital file the limit is full scale, so clipped samples sit at exactly the largest or smallest value the format allows, often several in a row. The flattened tops add strong harmonics high in the spectrum. The damage can be visible in the waveform even when it is hard to hear.

Counting clipped samples is easy once full scale is pinned down. In 16-bit audio the codes run from -32,768 to 32,767, so a sample at either end is at the ceiling. Runs matter more than the total. One full-scale sample can be a legitimate peak that just touched the top. Thirty in a row is a flat top.

DC offset is quieter but just as real. It is the mean value of the waveform, a constant pushed onto the signal so that its centre line is no longer zero. In recordings it usually comes from faulty or low-quality equipment before the sound reaches the recorder. It wastes headroom on one side, so the loudest parts clip sooner than they should, and in a stored file it can be removed by subtracting the mean from every sample. A viewer can find it by averaging, which is exactly what the mean is.

What a spectrogram adds

A waveform shows amplitude against time and hides frequency almost entirely. A pure tone and a burst of noise of the same level can look alike when zoomed out. The spectrogram fixes that by adding a dimension. Time runs across, frequency runs up, and colour stands for level, normally on a logarithmic scale in decibels.

It is built with the short-time Fourier transform. The signal is cut into short, overlapping frames, each frame is multiplied by a window that fades it in and out, and each windowed frame is turned into a spectrum by a fast Fourier transform. The Hann window, a raised cosine that falls smoothly to zero at both ends, is one of the most popular choices.

Here the trade appears that every spectrogram lives with. A wide window gives fine frequency detail and blurry timing. A narrow window gives sharp timing and coarse frequency. Make the window longer to separate two close notes and you lose the ability to say exactly when each one started. No setting removes this; you choose where to stand on it.

The spectrogram does not replace the waveform. Each shows what the other hides, which is why they belong one above the other on the same time axis.

A worked example you can repeat

Take a 1 kHz sine at half of full scale, sampled at 48 kHz as 16-bit audio. That is 48 samples per cycle, so one sample lands exactly on each crest. The report should read a peak of -6.02 dBFS and an RMS of -9.03 dBFS, 3.01 dB lower. The example signal in the tool begins with exactly this tone; select from 0.1 to 0.9 seconds and the report gives those two numbers.

Now the spectrogram. With a 2048-sample window at 48 kHz each frame lasts 42.7 ms and the frequency bins are 23.4 Hz apart. The 1 kHz tone falls in bin 43, whose centre is 1,007.8 Hz, because 1,000 divided by 23.4 is about 42.7. Switch to an 8192-sample window and the bins are 5.9 Hz apart, so the tone lands in bin 171 at 1,002 Hz. The line in the picture gets thinner and its start gets softer.

The same example ends with a 440 Hz tone driven to 1.6 times full scale. Select the whole file and the report finds 27,440 clipped samples in 880 runs, none longer than 32 samples. The second channel carries a steady offset of +0.05, which the report shows as a mean of 0.05, or -26.02 dBFS, and a single sample at -0.9 at 1.5 seconds that the waveform still shows when the whole file fits on one screen.

What the picture cannot tell you

Reading the file exactly matters as much as drawing it. A WAV file stores its format in a header: the sample rate, the channel count, the bit depth and whether the numbers are integers or floats, with 8-bit samples stored unsigned and wider ones as signed integers. A reader that follows that header can report the stored codes and the bit depth as they are. The format is also everyday archive material; the Library of Congress lists WAVE as a preferred format for audio.

Browsers can decode many other formats, but their decoder hands back 32-bit floating-point samples in the range -1 to +1 and resamples them to the rate of the audio context. That is fine for viewing and listening. It means the original bit depth of an MP3 or an AAC file is not known, and a viewer should say so rather than invent it.

So a waveform viewer cannot measure loudness as a listener hears it, cannot show the peaks that form between samples, and cannot tell a deliberate distortion from an accident. What it can do is refuse to drop information on the way to the screen. Every column shows its true extremes, every clipped run is counted, and every number says which convention made it.

Sources

Every source consulted for this guide. Links checked October 24, 2026.

  1. Waveform Wikipedia
  2. dBFS - Wikipedia Wikipedia
  3. Root mean square Wikipedia
  4. DC bias Wikipedia
  5. Clipping (audio) Wikipedia
  6. Spectrogram Wikipedia
  7. Short-time Fourier transform Wikipedia
  8. Window function Wikipedia
  9. WAV - Wikipedia Wikipedia
  10. WAVE Audio File Format Library of Congress, Sustainability of Digital Formats
  11. Wave File Specifications Peter Kabal, MMSP Lab, McGill University
  12. BaseAudioContext: decodeAudioData() method - Web APIs MDN Web Docs
  13. AudioBuffer - Web APIs MDN Web Docs
  14. Web Audio API - Web APIs MDN Web Docs