QR Code Decoder
Scan and decode QR code images online. Supports drag & drop, clipboard paste. All processing happens in your browser for privacy.
Drag and drop a QR code image here
Supports PNG, JPG, GIF, BMP, WebP and other common image formats
You can also paste an image from clipboard with Ctrl+V
What is QR Code Decoding?
The QR Code Decoder reads a QR code image and extracts the data stored inside it. The result may be a URL, plain text, Wi-Fi configuration, contact card, payment reference, or another encoded string. People use it to inspect a QR code before opening it, recover text from a screenshot, copy data from a document, or help someone troubleshoot a code that does not scan correctly on a phone. A decoded result is not automatically safe: links should still be checked before visiting, because QR codes can point to phishing pages, expired resources, or unexpected redirects. The image is processed locally in the browser.
How to Use
How to use
- Click the upload area to select a QR code image, or drag and drop an image
- You can also paste an image from clipboard using Ctrl+V (Cmd+V on Mac)
- The tool will automatically detect and decode the QR code content
- The decoded result appears below with automatic content type detection (URL or text)
- Click the 'Copy Result' button to copy the decoded content to clipboard
Decoding Tips
- Use a sharp image with the full QR code visible and enough quiet margin around it for reliable detection.
- Treat decoded links cautiously. Preview the text and verify the domain before opening unfamiliar QR code URLs.
Use Cases
Technical Principle
QR code decoding is a multi-stage image processing pipeline that locates the code in a photograph or screenshot, corrects for perspective distortion, thresholds the image to black and white, reads the module grid, applies error correction, and decodes the data according to the encoding mode. This tool uses the jsQR library, which implements the full pipeline in JavaScript running on the browser's main thread. The first stage is locating the three finder patterns — the distinctive 7×7 square-in-square-in-square markers at the top-left, top-right, and bottom-left corners of every QR code. jsQR scans the image for runs of alternating black and white pixels matching the 1:1:3:1:1 ratio characteristic of a finder pattern cross-section, regardless of rotation. Once three finders are located, their centroids define the code's bounding quadrilateral. Perspective correction transforms the quadrilateral into a square grid using a homography matrix computed from the four corner points. This is essential because QR codes are rarely photographed head-on — the correction un-warps the code so each module (the black or white square representing one bit) falls on a regular grid. The module size is determined by the finder pattern dimensions and the version number, which is read from the format information strips adjacent to the finders. Image binarization converts the grayscale pixel values to pure black and white. jsQR uses a local thresholding approach: rather than a single global threshold (which fails under uneven lighting or shadows), it computes thresholds for small regions of the image, making it robust to gradients and vignetting common in smartphone photos. Error correction uses Reed-Solomon codes as specified in ISO/IEC 18004:2015. QR codes support four error correction levels: L (~7% recovery), M (~15%), Q (~25%), and H (~30%). The data codewords and error correction codewords are interleaved in blocks; jsQR performs syndrome calculation and applies the Berlekamp-Massey algorithm to locate and correct errors within the code's rated capacity. If damage exceeds the correction level, decoding fails rather than returning corrupted data. Finally, the decoded bit stream is interpreted according to the encoding mode indicator in the first four bits: numeric (0001, 10 bits per 3 digits), alphanumeric (0010, 11 bits per 2 characters), byte (0100, 8 bits per character, typically UTF-8 or Latin-1), kanji (1000, 13 bits per character using Shift JIS), or ECI (0111, Extended Channel Interpretation for specifying character sets). The tool displays the decoded string and auto-detects whether it is a URL (by attempting new URL() parsing) or plain text.
- Finder pattern detection: jsQR scans rows for alternating black/white pixel runs matching the 1:1:3:1:1 ratio — three such patterns at approximately right angles to each other confirm a QR code's presence and orientation regardless of rotation.
- Perspective correction: A homography matrix computed from the four detected corner points maps the skewed quadrilateral onto a square grid — this step is essential because real-world photos rarely capture QR codes head-on.
- Adaptive binarization: Local thresholding divides the image into small regions and computes per-region thresholds, making the decoder robust to uneven lighting, shadows, and gradients that would defeat a global threshold.
- Reed-Solomon error correction (ISO/IEC 18004): Four levels (L/M/Q/H) provide 7-30% data recovery — the Berlekamp-Massey algorithm locates error positions and the Forney algorithm computes correction magnitudes; if damage exceeds the level, decoding fails cleanly.
- Encoding mode detection: The first four data bits indicate the mode — numeric (0001, efficient for digits), alphanumeric (0010, for A-Z 0-9 and symbols), byte (0100, for arbitrary UTF-8/Latin-1 data), kanji (1000, for Shift JIS), and ECI (0111, for character set specification).
- Version and module grid: QR code versions range from 1 (21×21 modules) to 40 (177×177), with each version adding 4 modules per side — the version is read from the format information strips near the finder patterns, and the module count determines the sampling grid density.
- Browser-local execution: The image is drawn to a hidden Canvas element, getImageData() extracts the raw RGBA pixel buffer, and jsQR processes it entirely in the browser's main thread — no image data is uploaded to any server, and the canvas is garbage-collected after decoding completes.
Examples
URL QR code
Scanned payload: https://example.com
Type: URL
Action: scanner opens the link in the system browser after confirmationPlain text QR code
Scanned payload: This is text content
Type: Text
Action: scanner copies the text to the clipboard or shows it in a result sheetWiFi credentials QR code
Scanned payload: WIFI:T:WPA;S:NetworkName;P:Password;;
Type: WiFi (WPA2)
Action: phones that recognise the format prompt 'Connect to NetworkName?' and join with the given passwordvCard contact card
Scanned payload: BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nTEL:+1-555-0142\nEMAIL:jane@example.com\nEND:VCARD
Type: Contact card
Action: phones offer to create a new address-book entry from the parsed fieldsFAQ
Is the image uploaded for decoding?
No. Decoding runs in your browser via WebAssembly or pure JS. The image bytes are read locally; nothing is sent to a server.
What input methods are supported?
Upload a file, paste an image from the clipboard, or drag and drop an image file. The image is processed in your browser and never uploaded to a server.
What does the decoder return?
The raw decoded text. The page detects whether the result is a URL or plain text and shows a badge accordingly. If it is a URL, an Open URL button is provided.
Why won't my QR decode?
Common causes: blur, low contrast, glare, perspective tilt, or the code is partially obscured. Crop closer, increase brightness, hold the phone steady at 90° to the surface. QR codes at error level L recover almost no damage; level H tolerates significant occlusion.
Can it decode QR codes from screenshots and PDFs?
Screenshots usually decode fine because they have perfect contrast and no perspective distortion. For PDFs, screenshot the QR section first, then upload the image.
Should I open every URL the QR contains?
No. QR codes are a known phishing vector ('quishing') because the URL is hidden inside the visual. Inspect the decoded URL before opening - the page shows the full URL so you can read the domain. Watch for typo-domains, IP addresses, and shortener URLs that hide the real destination.
Can it decode multiple QRs in one image?
The page detects one QR code per image. If you have an image with multiple codes, crop each one separately and upload them individually for the most reliable results.