flashman
← All posts

QR code deep-link encoding and scan debugging

Debug QR deep links by validating URL components, percent-encoding, payload density, app routing, camera behavior, and a visible fallback before printing codes.

2026-08-29 · 5 min read · Rahul Chitturi

  • qr
  • url
  • debugging

A QR image can scan correctly and still open the wrong screen. Query separators may be encoded at the wrong level, a mobile deep-link route may not match the deployed app, or a dense payload may become unreliable after printing.

Treat generation, optical scanning, URL parsing, and application routing as separate stages so a routing bug is not mistaken for a damaged code.

Build the URL by component

Encode each query name and value before assembling the final URL. Do not percent-encode the scheme, host, separators, or the entire completed URL as one string.

  • Use HTTPS as the human-readable fallback where possible
  • Verify plus signs, spaces, ampersands, and Unicode values
  • Avoid placing secrets or durable credentials in the payload
  • Keep redirect destinations allowlisted and observable

Test the physical artifact

Scan from the final screen or printed size with multiple camera apps and devices. Test realistic distance, lighting, contrast, quiet-zone margins, and any logo overlay before producing a large batch.

Show the destination text beside the code. Users need a fallback and a way to judge where a scan will take them before opening the link.

A Flashman workflow

Use the URL encoder to inspect components, the QR generator to create the final image locally, the diff tool to compare intended and scanned text, and the JSON formatter when the deep link carries encoded state.

Keep test cases for iOS and Android routing, an ordinary browser, expired redirects, offline behavior, and analytics parameters that must not alter the destination.

Try these tools