AUD · Audio tools

Image to Spectrogram

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

Turn an image into a sound that draws it. Load a picture, set how long the sound runs and which frequencies it covers, and download a WAV that shows the picture when you open it in a spectrogram.

How it works

A spectrogram plots time left to right, frequency bottom to top, and loudness as brightness. This tool runs that backwards. The image is reduced to a grid: one row per sine wave, one column per slice of time. Each pixel’s brightness sets how loud its row’s sine is at that moment, and the sines are summed into one file.

The bottom row of the picture is the lowest frequency and the top row the highest, so a viewer draws it the right way up. Between columns the level of each sine slides smoothly, so the picture fades from one column to the next rather than clicking.

Rows, columns, and length

Rows sets the number of sines, from 64 to 512. More rows gives a sharper picture and a slower render: 512 rows across 10 seconds is about 250 million oscillator steps, which takes a few seconds. Columns follow from the image’s shape, so a picture twice as wide as it is tall gets twice as many columns as rows.

Length is how long the sound runs. A spectrogram viewer fits the whole file to its window, so length mostly changes how many milliseconds each column lasts, which the slider’s hint shows. Under about 10 ms per column the viewer’s own time resolution starts to blur the columns together.

Frequency range and scale

The picture spans the bottom and top frequencies you set, on either scale:

  • Log spaces the rows by ratio, the way most music-oriented viewers draw frequency. Vayce’s Spectrogram opens on log from 20 Hz to half the sample rate, which is the default here.
  • Linear spaces them evenly in hertz, the way many analysis tools draw it.

The picture only looks right in a viewer set to the same scale and range. In the wrong one it is squashed toward the top or the bottom, but still recognisable.

Getting a clean result

  • Use high contrast. Bright shapes on black become sines against silence, which a viewer shows as crisp lines.
  • Tick Invert for dark artwork on a white background, so the dark parts are what sound.
  • Match the viewer’s dynamic range. Most show 80 to 100 dB from black to white; at 50 dB here, the picture’s greys sit in the top half of that, which keeps them clear of the viewer’s floor.
  • Leave headroom for a lossy encoder. MP3 and AAC remove content above about 16 kHz and smear quiet detail, so a picture meant to survive streaming should stay below 15 kHz.

Random starting phases keep the sines from lining up into one loud peak, and the level is set from the brightest column so the loudest moment lands at the output level you choose.

Frequently Asked Questions

It writes a WAV whose spectrogram shows your picture. Any JPEG, PNG, or WebP loads; bright, high-contrast shapes on a black background come out clearest, such as text, logos, line art, and silhouettes. A busy photo comes out as a dense wash of noise with the picture faintly inside it.

Open the WAV in a spectrogram viewer set to the same frequency scale and range: Vayce's Spectrogram, Audacity's spectrogram view, Sonic Visualiser, or a phone app. With the defaults, Vayce's Spectrogram on its log scale shows it the right way up and undistorted.

It is hundreds of sines at once, each fading in and out with its row of pixels. The ear hears that as filtered noise or a chord cluster; the shape only exists on the frequency axis, which is why it takes a spectrogram to see it.

Partly. An MP3 encoder cuts most content above 16 to 19 kHz and coarsens quiet detail, so the top of the image and its darker greys go first. Keep the top frequency under 15 kHz and the dynamic range under 50 dB if the file will be compressed.

It sets how quiet the darkest grey is. A spectrogram shows loudness in decibels, so brightness is mapped through decibels too: white is full level and a grey just above black is the range below it. Pure black is silent. Match the range to your viewer's colour scale for the most faithful tones.

On a log scale the bottom rows are packed a fraction of a hertz apart, closer than a spectrogram's frequency resolution of about 10 to 25 Hz. A viewer cannot separate them, so the bottom of the picture smears. Raise the bottom frequency to 100 Hz or more, or use the linear scale, to spread them out.

Explore Our Tools

Browse all tools