Also from our team: ProveAudio | TermsCraft | SnipBG | UprezIt | LogoWarp | PDF Grind | SlideGrit | TicketShred | Luxaris Digital | FadedFix

You can hide a QR code inside an audio file. The audio sounds like ambient tones or electronic noise. But open it in a spectrogram viewer and a scannable QR code appears on screen.

This is spectrogram steganography - hiding visual information inside sound. The same technique Aphex Twin used to hide his face in a song, applied to something functional: a QR code that actually scans.

Here is how to do it, what works, and what to watch out for.

How It Works

A spectrogram displays audio frequencies over time as a visual image. Low frequencies at the bottom, high frequencies at the top, brightness represents volume. When you convert an image to audio using the right parameters, the image becomes visible in the spectrogram.

A QR code is a high-contrast, structured image - black and white squares in a specific pattern. These properties make QR codes ideal for spectrogram embedding because the sharp contrast translates cleanly into audio frequencies.

Step by Step

Step 1: Generate a QR Code

Create your QR code using any generator (qr-code-generator.com, goqr.me, or your phone's built-in generator). The QR code can link to:

  • A URL (website, video, social media profile)

  • Plain text (a message, coordinates, a clue)

  • Contact information (vCard)

  • WiFi credentials

Important: Generate the QR code at a large size (at least 500x500 pixels) with maximum error correction (Level H). Error correction helps the QR code remain scannable even after the audio conversion introduces some noise.

Step 2: Optimize the Image

Before converting to audio, optimize the QR code image:

  • High contrast: Pure black on pure white. No gray, no gradients.

  • Add padding: Leave white space around the QR code (the "quiet zone"). Without it, the spectrogram edges may clip the code.

  • Square format: QR codes are square. Your output audio duration and frequency range determine the aspect ratio in the spectrogram. A square QR code needs a square spectrogram area.

Step 3: Convert to Audio

Upload the QR code image to Img2Sound. Configure the settings:

Duration: 10-15 seconds works well. Shorter durations compress the QR code horizontally in the spectrogram, making it harder to scan. Longer durations stretch it out, which is fine but makes the audio file larger.

Frequency range: The full 20-20,000 Hz range gives maximum vertical resolution. For a QR code that needs to be scannable, you want as much resolution as possible.

If you want the QR code to be inaudible (hidden in the ultrasonic range), use 16,000-20,000 Hz. Most adults cannot hear these frequencies, but the QR code will have less vertical resolution and may be harder to scan.

Download: Get the WAV file.

Step 4: Verify It Scans

Open the WAV file in a spectrogram viewer:

  • Audacity: View > Spectrogram (or click the track dropdown > Spectrogram)

  • Spek: Opens directly in spectrogram view

  • iZotope RX: Spectrogram view is the default

The QR code should be visible in the spectrogram. Now test scanning:

  1. Display the spectrogram on your screen
  2. Open your phone's camera or a QR scanner app
  3. Point it at the spectrogram on screen
  4. If it scans, you are done

Step 5: Troubleshoot If It Does Not Scan

If the QR code appears in the spectrogram but does not scan:

  • Increase duration. The QR code may be too compressed horizontally. Try 15-20 seconds.

  • Check contrast. Zoom into the spectrogram. Are the black squares clearly distinct from white? Low contrast means the audio levels need adjustment.

  • Increase error correction. Regenerate the QR code with Level H error correction (the highest). This makes the QR code more tolerant of noise.

  • Adjust the spectrogram viewer settings. Some viewers apply color maps that reduce the visual contrast. Switch to a grayscale or high-contrast color scheme.

  • Screen size matters. A small laptop screen may not render enough detail for scanning. Try on a larger monitor or zoom in.

Use Cases

CTF Challenges and Puzzle Games

Hide a QR code in an audio file as a puzzle clue. Players must figure out to open the audio in a spectrogram viewer, then scan the QR code to get the next clue. This is a confirmed real use case - CTF designers are already doing this.

Interactive Music Releases

Embed a QR code in a track that links to exclusive content - a hidden music video, unreleased track, or fan community signup. Fans who know about spectrogram art will find it. Everyone else just hears the music.

Digital Scavenger Hunts

Place audio files in physical locations (via NFC tags, Bluetooth beacons, or download links on posters). Each audio file contains a QR code visible only in the spectrogram, linking to the next location.

Artist Signatures

Embed a QR code linking to your artist profile or portfolio in every track you release. It functions as an invisible watermark that also serves as a link back to you.

Tips for Best Results

  1. Simple QR codes scan better. A QR code linking to a short URL has fewer modules (squares) than one encoding a paragraph of text. Fewer modules = larger squares = easier to scan from a spectrogram.

  2. Use URL shorteners. Instead of encoding https://www.yourwebsite.com/very/long/path/to/specific/page, encode a shortened URL. The QR code will be simpler and scan more reliably.

  3. Test in the spectrogram viewer your audience will use. If your CTF players will use Audacity, test in Audacity. If they will use Spek, test in Spek. Each viewer renders spectrograms slightly differently.

  4. Full frequency range produces the best scannable results. The 20-20,000 Hz range gives maximum resolution. The ultrasonic range (16,000-20,000 Hz) is inaudible but has much less resolution - QR codes may not scan.

  5. Pair with a hint. Unless your audience already knows about spectrogram art, give them a nudge: "Look at this file with different eyes" or "Not everything in audio is meant to be heard."

You Might Also Like

Create your first hidden QR code - 3 free credits, results in seconds.

Zack Knight

Author

Ready to Get Started?

Explore our products and services.

View Products