Skip to content
ToolsOnDuty - free online tools

Search tools

Loading tool search...

Digital Guides

How to Create and Scan QR Codes Safely

Generate a QR code that scans reliably and inspect unfamiliar codes before opening their destination.

By ToolsOnDuty Editorial Team

A QR code being generated, tested, and scanned safely

A QR code stores text in a square pattern that a camera can decode. It can contain a web address, contact details, Wi-Fi information, or ordinary text. The code does not verify that its content is trustworthy, so creation and scanning both require a few checks.

Reliable QR codes use strong contrast, enough quiet space around the pattern, and a size appropriate for the scanning distance. Safe scanning means reading the decoded destination before opening it.

Choose the exact content

For a website, use the final HTTPS URL and remove unnecessary tracking parameters unless campaign measurement is intentional. Test the destination directly in a browser before encoding it. Shorter content usually creates a less dense pattern that is easier to scan at small sizes.

A QR code is not automatically dynamic. If it contains a direct URL, changing the destination later requires a new code unless the URL points to a redirect you control.

Generate for reliable scanning

Use dark modules on a light background and keep the border clear. Decorative colors can work, but low contrast and busy backgrounds reduce reliability. Export at enough resolution for the intended print size.

  • Do not crop the empty quiet zone around the code.
  • Avoid stretching the image out of square proportions.
  • Do not overlay a logo casually; this generator has no logo-upload control, and an external overlay needs its own scan tests.
  • Test from more than one phone before printing in quantity.
QR code generated for the ToolsOnDuty website with medium error correction
Keep the code square, preserve its clear border, and test the exported image.

Use the controls on a reproducible website example

Enter https://toolsonduty.com into Text or URL and choose Medium (15%) under Error correction. Keep the default dark modules and white background, Quiet zone at 4 modules and Size at 8 px/module. The local matrix helper produces 25 modules across for this exact payload; adding both margins gives (25 + 4 + 4) x 8 = 264 pixels per side.

Size is pixels per module, not a fixed final image width. Changing the payload or correction level may change the matrix dimensions and therefore the total output size. A shorter final URL can be easier to use at a small size, but do not replace it with an unfamiliar redirect just to make the pattern simpler.

Download PNG creates the raster image; Download SVG provides vector geometry for a suitable print or design workflow. Exporting SVG is not proof that your printer will preserve the border or contrast. Inspect the final placed artwork after any resizing, cropping or other editing.

Scan-readiness checks passed is a heuristic based on colors, contrast and quiet-zone settings. It is not an actual camera result, a certification of the URL or permission to cover a stated percentage of the pattern. Test the downloaded code and the printed version separately.

Local helper geometry, not a new camera or print test.text
Payload: https://toolsonduty.com
Error correction: M
Matrix: 25 x 25 modules
Quiet zone: 4 modules on each side
Size: 8 px/module
Computed PNG dimensions: 264 x 264 pixels

Inspect before opening

QR stickers can cover legitimate codes in restaurants, parking areas, and payment locations. After scanning, read the displayed domain carefully. Watch for misspellings, unexpected URL shorteners, unusual payment requests, and pages asking for credentials.

When a code comes from an image, decode it first and copy the text if necessary. Opening should be a separate decision, not an automatic consequence of scanning.

Decode a downloaded image before deciding to visit

Open QR Code Scanner and choose Upload image for the generated PNG. The scanner uses browser-readable image input and shows decoded text in Result when a code is found. For camera scanning, choose Scan with camera and grant permission if appropriate; use Stop camera when finished. Successful camera decoding stops the active stream in this implementation.

Compare the complete decoded content with your intended payload. For HTTP(S) content, the tool shows the destination host and offers a separate opening action rather than navigating immediately. A decoded URL can still point to a redirect or deceptive page, so the first host check is not the end of verification.

If an image fails, try a clearer source with the entire border visible. Image files above the implementation's 20 MiB limit are rejected, and large images are scaled to a maximum 2,048-pixel long edge before decoding. A tiny code inside a huge picture can lose detail during that step. Camera permissions and browser support can also prevent a scan.

Test the printed version

A code that scans from a monitor can fail after printing because of blur, glare, folds, or insufficient size. Print a sample at final dimensions, place it in realistic lighting, and test from the expected distance.

Treat the payload as readable information

A Wi-Fi starter includes network and password fields as plain encoded content. A QR image carrying those values is not encrypted and can reveal them to anyone who can decode it. Use only the appropriate network information and control how the image is shared.

QR generation and decoding run in the browser, but loading site assets or decoder libraries can still use the network. Camera permission, copied text and downloaded images are separate privacy considerations. Never infer that local processing makes a published credential or scanned link safe.

Apply the steps from this guide directly in your browser.

Frequently asked questions

Can a QR code expire?

A direct QR code does not expire, but the URL or service it points to can change, stop working, or impose its own expiration.

Can scanning a QR code infect my phone?

Scanning only reveals data, but opening a malicious destination or installing a prompted application can create risk. Inspect the result first.

Why will my printed QR code not scan?

Common causes include low contrast, a missing quiet zone, small size, blur, distortion, glare, or too much embedded data.