QR Code Decoder

Decode QR codes from image files using your browser.

Back to all tools on ToolForge

More in Encoding & Decoding

QR image

Decoded text

About QR Code Decoder

This QR code decoder reads QR codes from uploaded images using the BarcodeDetector API directly in your browser. It is useful for verifying printed QR codes, extracting links from screenshots, checking campaign codes, and reading QR data from saved images without uploading files to external servers.

What is the BarcodeDetector API?

The BarcodeDetector API is a native browser API for detecting barcodes and QR codes from images. It provides fast, client-side decoding without requiring external libraries or server-side processing.

// Browser support check
if ("BarcodeDetector" in window) {
  const detector = new BarcodeDetector({ formats: ["qr_code"] });
  detector.detect(imageElement).then(codes => {
    codes.forEach(code => console.log(code.rawValue));
  });
}

Supported Barcode Formats

Format Description Common Use
qr_code 2D matrix barcode URLs, text, contact info, WiFi credentials
code_128 High-density linear barcode Shipping labels, product identification
code_39 Variable-length linear barcode Inventory, ID cards, automotive industry
ean_13 13-digit European Article Number Retail product packaging
upc_a 12-digit Universal Product Code Retail products in North America
datamatrix 2D matrix barcode (smaller than QR) Electronics components, small items

QR Code Structure

QR codes consist of several key components that enable reliable decoding:

QR Code Error Correction Levels

Level Recovery Capacity Use Case
L (Low) ~7% of codewords Clean environments, minimal damage risk
M (Medium) ~15% of codewords General purpose (default level)
Q (Quartile) ~25% of codewords Industrial environments, outdoor use
H (High) ~30% of codewords Harsh conditions, high damage risk

Common Use Cases

Browser Support

Browser Support Status
Chrome (desktop & Android) ✓ Full support (v87+)
Microsoft Edge ✓ Full support (v87+)
Opera ✓ Full support
Firefox ✗ Not yet supported
Safari ✗ Not yet supported

Tips for Successful Decoding

Frequently Asked Questions

What is the BarcodeDetector API?
The BarcodeDetector API is a native browser API that detects barcodes and QR codes from images. It supports multiple formats including QR code, Code 128, Code 39, EAN-13, and more. The API is available in Chromium-based browsers (Chrome, Edge, Opera) but not yet in Firefox or Safari.
What image formats are supported for QR decoding?
This tool supports all common image formats: PNG, JPEG, GIF, WebP, BMP, and SVG. The image must contain a clearly visible QR code with good contrast. Blurry, low-resolution, or heavily compressed images may fail to decode.
How does QR code detection work?
QR codes contain three position detection patterns (large squares) at three corners that help the decoder locate and orient the code. The BarcodeDetector API analyzes the image, finds these patterns, extracts the grid data, and decodes the binary information into text or URLs.
What types of data can QR codes contain?
QR codes can store URLs, plain text, contact information (vCards), WiFi credentials, email addresses, phone numbers, SMS messages, and more. The decoder extracts the raw data; specialized formats like vCards will appear as formatted text that you can parse separately.
Why might a QR code fail to decode?
Common failure causes: poor image quality or blur, insufficient lighting or contrast, QR code is too small or partially obscured, the code is damaged or corrupted, or the browser lacks BarcodeDetector support. Ensure the QR code is clearly visible and the image is in focus.
Can this tool decode multiple QR codes from one image?
Yes, the BarcodeDetector API can detect multiple QR codes in a single image. If an image contains several QR codes, all detected codes will be extracted and displayed, each on a separate line.