QR Code Decoder

JJ Ben-Joseph headshot JJ Ben-Joseph

How to Use This QR Code Decoder

This tool lets you upload an image that contains a standard QR code and instantly reveals the content it stores, such as a URL, short text message, contact card, or Wi‑Fi details. Decoding happens directly in your browser for speed and privacy—your image is not sent to a server.

  1. Choose a clear image that shows the full QR code (no major cropping or blur).
  2. Upload the file using the form above (JPG or PNG works best).
  3. Wait a moment while the code is scanned in your browser.
  4. Read the decoded content in the results panel. If it is a link, you can usually open it in a new tab.

The decoder is built around a pure JavaScript engine (based on the open‑source jsQR library) and the HTML5 canvas API, so it works on most modern browsers without additional plugins.

QR Code Size Formula

A QR code is a square grid of small black and white modules. The number of modules on each side depends on the version number. Version 1 uses a 21 × 21 grid and each higher version adds four modules per side. This relationship can be written as:

m = 4 v + 17

Here, m is the number of modules on each side and v is the QR version (1–40). For example, a version 5 QR code has m = 4 × 5 + 17 = 37, so the full grid is 37 × 37 modules. Larger versions can store more information but demand higher image quality for reliable decoding.

Error Correction Levels

QR codes use Reed–Solomon error correction, which adds redundant data so the reader can reconstruct the message even if part of the code is damaged or obscured. Four standardized error‑correction levels are defined:

Level Approx. recovery Typical uses
L ~7% of codewords Maximum data capacity when damage is unlikely
M ~15% General‑purpose marketing and basic labels
Q ~25% Moderate wear, outdoor posters, packaging
H ~30% Industrial labels, codes with logos printed over them

Higher error‑correction levels allow a QR code to survive more damage but reduce how much user data it can hold. This decoder automatically detects the error‑correction level encoded in the symbol and attempts to reconstruct the original data accordingly.

How the Decoder Works in Your Browser

When you upload an image, the browser uses the FileReader API to load it and then renders it into an off‑screen HTML5 canvas. The decoding routine then:

  • Analyzes the pixel data to find the three large finder patterns in the corners.
  • Corrects perspective so that tilted or skewed QR codes become square again.
  • Samples each module in the grid to reconstruct the bit pattern.
  • Applies Reed–Solomon error correction to fix missing or corrupted bits.
  • Interprets the resulting bytes according to QR code standards to produce text.

Conceptually, Reed–Solomon treats the encoded data as coefficients of a polynomial, allowing some of them to be recovered from the remaining values. In MathML form this idea is often written as:

P ( x ) = i k a i x i

While the full algebra is more involved, the important point is that this approach makes QR codes robust to partial damage or noise, which is why your camera or browser can still decode slightly scratched or dirty symbols.

Interpreting the Decoded Result

Once the tool finishes, it shows the decoded contents as plain text. Common patterns include:

  • URLs: Web addresses such as https://example.com/promo. Many browsers turn these into clickable links.
  • Plain text: Short notes, coupon codes, or instructions.
  • Contact data (vCard / MeCard): Name, phone, and email that contact apps can import.
  • Wi‑Fi settings: Network name and password in a structured format.

This QR code decoder does not automatically perform any actions with the decoded data. You stay in control: if the result is a URL, review it first and then decide whether to visit it.

Worked Example

Imagine you have a flyer from a local event with a QR code linking to online registration. To verify where it goes before scanning it with your phone, you can use this page:

  1. Take a photo of the flyer, making sure the QR code is in full view and in focus.
  2. Open this QR code decoder in your browser.
  3. Upload the photo using the file field at the top of the page.
  4. Wait for the decoder to process the image. Within a second or two, you should see a URL such as https://example-event.com/register.
  5. Check that the domain and path look trustworthy before visiting the page.

This workflow is especially useful if you want to inspect QR codes from posters, emails, or screenshots without granting them direct access to your device's camera app.

Typical Use Cases and Comparison

The browser‑based decoder on this page differs from the camera app on your phone or a dedicated QR reader. The table below highlights some practical differences.

Feature This browser decoder Phone camera QR scanner
Where decoding happens In your browser, on your device In the camera or QR app on your phone
Image source Existing images (photos, screenshots, scans) Live camera stream
Privacy Image stays local; no upload required Depends on app; some may send data to servers
Control over decoded URL Shows text first; you choose what to open Often prompts directly to open the link
Platform requirements Modern desktop or mobile browser with JavaScript Phone or tablet with camera and QR support

Limitations and Assumptions

To set clear expectations, keep the following limitations and assumptions in mind when using this QR code decoder:

  • Standard QR codes only: The tool targets typical QR codes that follow common standards. It may not decode proprietary or unusual formats used in niche industrial systems.
  • Image quality matters: Very blurry, low‑resolution, overexposed, or underexposed images can fail to decode because the module boundaries are no longer clear.
  • Entire code should be visible: If the QR code is cropped, partly covered, or wrapped tightly around a curved surface, the decoder might not be able to reconstruct the full grid.
  • Single‑code focus: In most cases, this type of library is tuned to find one dominant QR code in the image. Multiple overlapping codes in the same picture can confuse the detector.
  • File types and size: Common formats like JPG and PNG are supported. Very large images may take longer to process or may be constrained by your browser's memory limits.
  • Browser support: The decoder relies on modern JavaScript and canvas features. Old browsers, very strict privacy modes, or disabled scripting can prevent it from working.
  • No network decoding: The page does not fetch or follow the decoded URL for you. If the content looks suspicious, you can simply ignore or delete it.

Frequently Asked Questions

Why won't my QR code decode?

Most failures come from image issues: the code is too small in the photo, badly blurred, heavily distorted, or partially hidden. Try taking a clearer picture, zooming in so the code fills more of the frame, and ensuring good lighting without glare.

Is my image uploaded to a server?

No. Decoding happens entirely in your browser using JavaScript and an off‑screen canvas. The image stays on your device and is not sent to a remote server by this tool.

Can this decode multiple QR codes in one image?

The underlying decoder is optimized to find a single main QR code per image. If you need to decode several codes, crop each one into its own file or take separate photos and upload them one by one.

Does this QR code decoder work offline?

Once the page and its scripts are fully loaded in your browser, the actual decoding does not require a network connection. However, your browser must first load the page and assets from the site, which typically needs an internet connection.

Is it safe to open links from QR codes?

A decoded QR code can contain any URL, including malicious or misleading ones. Always review the domain name and path before visiting a link. This page helps by showing you the text first so you can make an informed choice.

Supported formats include JPG and PNG. The file stays on your device.

Upload an image containing a QR code.

Embed this calculator

Copy and paste the HTML below to add the QR Code Decoder - Read Codes from Images to your website.