How to generate a QR code and verify its contents

This guide covers one job: turning a URL or a short piece of text into a QR code, saving it as PNG or SVG, and decoding the saved image to confirm it contains exactly what you entered. It describes how the tool is designed to work. It is not a report of testing on phones or scanner apps.

Task and input

The tool has two modes, Create and Read. In Create you choose a content type (URL, Text or Wi-Fi), enter your content and export the code. This guide uses URL and Text. Wi-Fi is another mode with its own field format and has a separate guide.

The worked example uses the URL https://example.com/a?q=one%20two. It includes a scheme, a path, a query string and a percent-encoded space, and every one of these must come back unchanged. For Text mode, try Привет, мир! 😀, which combines non-Latin letters, punctuation and an emoji.

Worked steps

Step 1: Open Create and select URL. Paste https://example.com/a?q=one%20two exactly as written, including https:// and %20. Make sure no spaces or line breaks came along with the paste.

Step 2: Generate the code. Encoding is done by the qrcode-generator JavaScript library (https://github.com/kazuhikoarase/qrcode-generator), using pinned release 1.4.4 served from the site itself. The tool is designed not to call any external or paid service at runtime.

Step 3: Export. PNG is a raster image. SVG is a vector format that stays sharp at any print size. If you plan to verify the code in the next section, export a PNG as well, because Read mode accepts PNG and JPEG files.

Step 4: For text, switch to Text, enter Привет, мир! 😀 and repeat the same generation and export steps.

Verify the result

Open Read, choose the exported PNG from your device and press Decode. The image is meant to be processed locally. Decoding uses jsQR (https://github.com/cozmo/jsQR), pinned version 1.4.0, also served locally. jsQR reads the image's RGBA pixel data along with its width and height and returns the decoded data when it finds a code.

The decoded contents appear as literal text with a Copy button. Links are not opened automatically, so you can inspect a URL before visiting it. Compare the result with your input character by character. For the example URL, check that the scheme is still https://, that letter case is unchanged, that %20 has not become a space or a plus sign, and that nothing was added or removed at the end. Under the ZXing barcode contents convention, URLs retain their scheme and case (https://github.com/zxing/zxing/wiki/Barcode-Contents). If the decoded result differs from your input in any way, regenerate the code from clean input, export it again and repeat the check.

For the text example, confirm that the Cyrillic letters, the comma, the exclamation mark and the emoji all survive. To check an SVG export, render it to PNG with a tool you trust and decode that file, or decode the PNG you exported from the same input.

Limits and common mistakes

A correct decode here confirms the payload. It does not prove that every phone or scanner app will read the code. ZXing describes its content formats as a practical convention and notes that reader support varies (https://github.com/zxing/zxing/wiki/Barcode-Contents). No scan rate is guaranteed.

Decode the exported file first. A photo of a printed or on-screen code may fail to decode because of blur, glare, perspective or cropping, and a failure like that says little about the file itself.

If you leave out https://, the code still contains exactly what you typed, but whether a reader treats it as a link depends on that reader. Pasted text can also bring hidden trailing spaces or line breaks, and these are encoded too. If you change the content after exporting, generate and export again, since an old file does not update.

A QR code is not encryption. Anyone who can scan it can read what it contains. Keep this in mind for any mode, and especially for Wi-Fi codes, which carry the network password in readable form.

Sources

ZXing wiki, Barcode Contents (URL scheme and case, reader compatibility): https://github.com/zxing/zxing/wiki/Barcode-Contents

qrcode-generator, the upstream encoder: https://github.com/kazuhikoarase/qrcode-generator. Pinned package 1.4.4: https://registry.npmjs.org/qrcode-generator/1.4.4

jsQR, the decoder (RGBA input, possible failures on arbitrary photos): https://github.com/cozmo/jsQR. Pinned package 1.4.0: https://registry.npmjs.org/jsqr/1.4.0

Sources captured on 2026-09-28. They have not been re-verified since. The example URL and text were written for this guide.