ZeroUtil

Audio Waveform Generator

Generate a SoundCloud-style waveform image from any audio file. Decoded in your browser, exported as PNG or SVG.

Maintained by

How to Generate an Audio Waveform Image

  1. Drop your audio file onto the upload area. MP3, WAV, M4A, OGG and FLAC up to 200 MB are accepted. The file is decoded entirely in your browser using the Web Audio API.
  2. Pick the visual style: bars (top-only, classic SoundCloud look), mirror (top + bottom symmetric), or continuous filled line.
  3. Tweak colors and dimensions: foreground, background, width and height. Defaults render at 1200x240 px which suits most blog and podcast cover images.
  4. Download as PNG or SVG. PNG is best for static thumbnails; SVG is best when you need infinite scalability or want to edit the waveform vectors in Illustrator/Figma.

How the waveform is computed

The tool reads the entire audio file into an ArrayBuffer, hands it to AudioContext.decodeAudioData for sample-accurate decoding, then downsamples to ~2,000 buckets. For each bucket we keep the maximum absolute amplitude across all channels. That peak array is what you see drawn - the result is a "peak waveform" view, the same algorithm SoundCloud, Audacity and DAWs use for their preview strips.

Everything happens in your browser. Open DevTools and the Network tab while you generate a waveform: zero outbound requests carry your audio. The decoded audio buffer is discarded once the peaks are extracted, so memory usage stays low.

Use cases

  • Podcast cover image: generate a waveform of the episode\'s opening 30 seconds and overlay the title.
  • Blog illustration: embed the waveform of a music sample you discuss in writing.
  • Audiogram-style social posts: export SVG, animate it with CSS, and you have a Twitter video without a video editor.
  • Visual music QA: spot loud spikes or silent gaps before mastering.
  • Mood-board art: different songs produce visually distinct shapes - useful for album art draft.

Frequently Asked Questions

Does my audio file leave my computer?

No. The file is read into an ArrayBuffer in your browser, decoded with the Web Audio API, downsampled to peaks, and rendered to a Canvas. None of the audio bytes are sent over the network. You can verify with DevTools > Network: no outbound requests for the audio.

What is a peak waveform?

A peak waveform is a compact visual representation of an audio file: the original ~44,100 samples per second are summarised into a few thousand "buckets", and each bucket records the loudest sample inside it. SoundCloud, Audacity and most DAWs use this exact approach for their preview strips. It is fast to compute and visually informative without storing every sample.

Why is my waveform image flat or weak-looking?

The audio is probably very quiet relative to its peak (low average loudness, high dynamic range). The visualization scales to the absolute peak, so if the loudest moment is 0.1 the rest looks tiny. If you want a more "filled" waveform run the audio through a normalizer or compressor first - or pick a louder section of the file.

What is the difference between PNG and SVG output?

PNG is a raster image - fixed pixel grid, compact, best for fixed-size embeds (blog hero, podcast thumbnail). SVG is vector - scales to any size without blur, smaller for simple shapes, editable in Illustrator and Figma. For social media and YouTube thumbnails pick PNG. For a logo treatment or a poster pick SVG.

How wide can the waveform be?

Up to 4096 px in this tool, which suits 4K thumbnails. The downsample step uses ~2,000 buckets regardless of width, so going wider just stretches the bars. For ultra-wide or animated visualizations export SVG and scale it.

Why does decoding take a while?

The Web Audio API decodes the entire file into uncompressed samples in memory before peaks can be extracted. For a 1-hour MP3 that is roughly 600 MB of float32 audio. Browsers do this on a worker thread but it still takes 5-15 seconds for long files. Smaller MP3s decode in under a second.

Can I generate waveforms in real time as audio plays?

This tool generates a static peak image of the whole file. For real-time visualization (bouncing bars during playback) you would need an AnalyserNode hooked into Web Audio and an animation loop - that is a different workflow. We may ship a separate tool for it if there is demand.

Does it work for video files?

No - the Web Audio API decodes audio formats only. To generate a waveform from a video, first extract the audio using the <a href="/tools/extract-audio-from-video/">extract audio from video</a> tool and feed the resulting MP3 or WAV here.

More Video & Audio