QR Code Scanner

Published Updated

Read a QR code from a photo or screenshot, or point your camera at it, and see the full decoded text first, with an Open Link button only for http and https addresses.

You see the text before anything opens

Nothing opens on its own. After a code is read, its full content appears in a box, and only addresses that start with http:// or https:// get an Open Link button. That pause matters: the US Federal Trade Commission warns that scammers hide harmful links in QR codes and advises you to inspect the URL before you open it, above all for codes in unexpected places. Its examples include fake codes stuck over the real ones on parking meters, and codes sent by text or email with a made-up reason to scan.

Check the domain, not just the start of the address. A link full of tracking parameters can be trimmed with URL Cleaner first.

What the decoded text looks like

QR codes for Wi-Fi, contacts and events are plain text in agreed formats. Examples from the ZXing project's barcode contents reference:

Code typeText this tool shows
Web linkhttps://example.com/menu (with an Open Link button)
Wi-Fi networkWIFI:T:WPA;S:mynetwork;P:mypass;;
Contact cardBEGIN:VCARD ... END:VCARD, or MECARD:N:Owen,Sean;TEL:...;;
Emailmailto:someone@yoursite.com
Phone numbertel:+1-212-555-1212
Text messagesms:+18005551212:message
Calendar eventBEGIN:VEVENT with SUMMARY, DTSTART and DTEND lines
Map locationgeo:40.71872,-73.98905,100

Only web links get a button. To make codes like these, see QR Code Generator, WiFi QR Code Generator, vCard QR Code Generator and Event QR Code Generator.

Upload or camera?

The two modes run the same decoder with different settings:

Upload ImageUse Camera
Light codes on a dark backgroundRead (an inverted copy is tried too)Not read
SpeedThe full picture is searched, then an inverted copy if needed; in our test a smooth 4,032 x 3,024 photo took 383 to 484 ms in four browsers and a grainy one up to 108 seconds (see the timing table below)Checks each video frame until one decodes
NeedsNothing beyond the filePermission and an HTTPS page, as MDN's getUserMedia page explains
Best forScreenshots, saved images, codes on a screenPrinted codes in good light

225 test pictures in four browsers: what the scanner read

We ran this page's scanner, unchanged, in Google Chrome 156, Chromium 153 (Playwright build, not Google Chrome), Firefox 155 and Playwright's WebKit build (not the Safari app). The codes were made with qrcode 1.5.4, the library behind our QR Code Generator, and a script then shrank, turned, blurred, shaded or damaged them. Each picture was scanned once in each browser. For all 225 pictures the four browsers gave the same answer, which fits the code: the search is done by the same JavaScript decoder, jsQR 1.4.0, in every browser.

What we changedStill readNot read
Shrunk with smoothing (versions 1, 4, 10 and 25)2, 2.5 and 3 px per module for all four; 1 px per module for versions 4, 10 and 251.25 and 1.5 px per module for all four; 1 px per module for version 1 (a 29 x 29 picture)
Turned flat on the pageAll ten angles tried: 0, 5, 15, 30, 45, 60, 90, 135, 180 and 270 degreesNone
Seen from the side (perspective)Up to 55 degrees off-axis60, 70 and 80 degrees
Grey modules on white (0 is black, 255 white)Grey 120 and darkerGrey 128 and lighter
Black modules on a dark grey backgroundAll seven backgrounds, from grey 128 down to 8None
Uneven lightBrightness falling smoothly to 10% at one edgeA sharp shadow edge down the middle, right half at 35% or 15%
Blur, modules 8 px wideGaussian radius 1, 2 and 3 pxRadius 4, 5, 6 and 8 px
Grain (standard deviation in levels of 255)16 and 3248, 64, 96 and 128
JPEG compression, 3 px per moduleQuality 90, 50, 20, 10 and 5None
Light code on a dark backgroundWhite on black, with or without a white page around itNone in Upload mode; the camera mode's setting, called directly on the same two pictures, read neither
Transparent PNG backgroundBlack, white or navy modules on a fully transparent background, and black on half-transparent white; a picture with transparent pixels is tried again over whiteNone

Most pictures carry the same 56-character link (version 4 at level M, 33 x 33 modules, 8 pixels per module unless the row says otherwise). They are generated pictures, not photos: we did not scan printed codes, screens or anything through a phone camera, and the live camera mode was not run.

Scratches and covered corners, by error correction level

The same link at each level, with whole rows of modules wiped white across the middle, whole columns wiped down the middle, or an 8 x 8-module square covered. Same result in Chrome 156, Chromium 153, Firefox 155 and the WebKit build.

Level (version, modules)Rows wiped across: most that still readColumns wiped down: most that still readCentre 8 x 8 coveredTop-left corner square or bottom-right corner covered
L (4, 33 x 33)None (1 row failed)2Not readNot read
M (4, 33 x 33)None (1 row failed)3ReadNot read
Q (5, 37 x 37)36ReadNot read
H (6, 41 x 41)68 (the most tried)ReadNot read

Two results stand out. A scratch along one row of modules stopped levels L and M, while a gap two or three columns wide down the middle did not. And hiding one corner stopped every level, H included, even though H still read with six rows wiped. For L the centre square is 24 percent of the side, about the limit that QR Code Generator's own hidden-square test reports for L.

Codes from our generator, read back by this scanner

We made a code for every version from 1 to 40 with QR Code Generator itself: the page's real generator, level M, margin 4, the longest test link that still gives each version, at 100, 200, 300, 500 and 1,000 on its size slider. Each PNG was taken from the generator's own canvas, the picture its Download PNG button saves, and handed to this scanner. All 200 were read, with the text unchanged, in Chrome 156, Chromium 153, Firefox 155 and the WebKit build.

The generator gives every module the same whole number of pixels. It divides the chosen size by the code's width in modules, margin included, rounds to the nearest whole number (at least 1) and draws the PNG at that multiple, so the file can be a little smaller or larger than the slider value. A line under the slider gives the real size. Some of the 200, PNG width in pixels with pixels per module in brackets:

Version (modules with margin, characters)Slider at 100Slider at 300 (default)Slider at 1,000
1 (29, 14)87 (3), read290 (10), read986 (34), read
10 (65, 213)130 (2), read325 (5), read975 (15), read
15 (85, 412)85 (1), read340 (4), read1,020 (12), read
20 (105, 666)105 (1), read315 (3), read1,050 (10), read
30 (145, 1,370)145 (1), read290 (2), read1,015 (7), read
40 (185, 2,331)185 (1), read370 (2), read925 (5), read

For comparison we scanned the same 200 codes drawn the other way, stretched to the slider width with the qrcode library's own width option. Then neighbouring modules are a pixel wider or narrower than each other (version 15 at 300 px works out at 3.53 pixels per module, in runs of 3 and 4 pixels), and 66 of the 200 were not read in any of the four engines, among them version 15 and version 40 at 300 px and version 24 at 1,000 px (8.26 pixels per module). So even modules, not only big ones, decide whether this decoder finds a code.

The codes for Wi-Fi, vCard, SMS, Email, Event and WhatsApp are drawn by one shared panel with the same rule: versions 1, 10, 15, 20, 30 and 40 at 100, 300 and 1,000 were all read. The bulk generator's ZIP gave whole-pixel modules too (versions 15, 30 and 40 at 300 and 1,000, all read). A code with 1 pixel per module, such as version 40 at 100, was read from the file here, but that is far too small to print or to show on a screen for a phone.

Large and grainy photos: time to an answer

Time from choosing the file to the answer on the page, one run each, in Chrome 156, Chromium 153, Firefox 155 and the WebKit build. The pictures are generated stand-ins for photos (gradients and shapes, saved as JPEG at quality 90) with the 56-character code pasted in.

PictureChrome 156Chromium 153Firefox 155WebKit buildAnswer
4,032 x 3,024, smooth, code 8 px per module383 ms386 ms484 ms415 msRead
4,032 x 3,024, smooth, no code447 ms462 ms580 ms434 msNo QR code detected
4,032 x 3,024, light grain, code 8 px per module1,032 ms1,082 ms1,305 ms898 msRead
4,032 x 3,024, heavy grain, code 8 px per module51.2 s51.6 s107.6 s44.3 sNo QR code detected
4,032 x 3,024, heavy grain, no code50.3 s56.1 s105.1 s43.9 sNo QR code detected
The heavy-grain picture cropped to 1,000 x 1,000 around the code515 ms520 ms1,033 ms569 msRead
The heavy-grain picture cropped to 2,016 x 1,5124,124 ms4,139 ms10,576 ms5,038 msNo QR code detected
8,064 x 6,048, smooth, code 12 px per module2,045 ms1,968 ms2,329 ms2,188 msRead

Grain, not size, made the difference: the smooth 48-megapixel picture took about 2 seconds, while the grainy 12-megapixel one took 44 to 108 seconds and reported no code although one was there. The scanner calls the decoder directly when the picture has loaded, so the tab stays busy until it answers. Cropped to 1,000 x 1,000 around the code, the grainy picture was read in 515 to 1,033 ms; a looser 2,016 x 1,512 crop still found nothing, after 4.1 to 10.6 seconds.

Reading a code

  1. Step 1

    Upload a picture of the code

    A screenshot or photo in any format your browser opens. The whole image is searched at full resolution, so there is no need to crop tightly.

  2. Step 2

    Or scan with your camera

    Start Camera asks for permission, prefers the rear lens on a phone and checks every frame. It stops at the first code it reads.

  3. Step 3

    Read before you open

    The decoded text is shown in full. Web addresses get an Open Link button; Wi-Fi, contact and other codes show their raw text with a Copy button.

If no code is detected

  • Keep the whole code in the picture, all three corner squares included.
  • Use one code per image. Two codes side by side in a test picture gave no result.
  • Improve light and focus, and avoid glare across the code.
  • For a code on a screen, take a screenshot rather than a photo of the screen.
  • If the camera refuses to start, Webcam Test shows whether the browser can see it at all.

What the box and the Open Link button show

Eight codes with awkward contents; Chrome 156, Chromium 153, Firefox 155 and the WebKit build showed the same. The last column is where the button points, as the browser parsed the address.

Code containsBox showsOpen LinkButton points to
HTTPS://EXAMPLE.COM/MENUThe same textYeshttps://example.com/MENU
Three spaces, then https://example.com/menuThe address; the spaces are not visibleYeshttps://example.com/menu
www.example.com/menuThe same textNo (no http:// or https://)None
javascript:alert(1) or data:text/html,<b>hi</b>The same textNoNone
https://exаmple.com/login with a Cyrillic аThe same text; the а looks like a Latin aYeshttps://xn--exmple-4nf.com/login
https://example.com@example.net/loginThe same textYesThe host example.net
A contact card (BEGIN:VCARD ... five lines)One line; the line breaks show as spacesNoNone

The last three rows are where the FTC advice quoted at the top of this page matters: the box can look like one site while the button opens another. Copy to Clipboard copies the stored text, line breaks included (that is what the code does).

Scanning QR codes: answers

Is the picture or camera feed sent anywhere?

The scanner decodes the image or the camera frames inside your browser tab with the jsQR library, and no request carries them to our servers. The camera switches off once a code is read, or when you change to upload mode.

Why won't the camera start?

The browser must get your permission first, and it only offers the camera on HTTPS pages. Check that camera access is allowed for this site in your browser settings. The request prefers the rear lens but does not require it, so a laptop webcam works too.

Can it read a QR code from a screenshot on the same phone?

Yes. Take the screenshot, choose Upload Image and pick it from your photos. A sharp, flat screenshot reads more reliably than a photo of a screen.

Can it read barcodes, or several QR codes at once?

It reads QR codes only, so a product barcode such as EAN or UPC gives no result. It returns one code per image, and in a test with two codes side by side in one picture it returned none. Crop to one code first.

How do I see the Wi-Fi password in a QR code?

Scan it and read the text. A Wi-Fi code looks like WIFI:T:WPA;S:network name;P:password;; and the password follows P: up to the next semicolon that has no backslash before it, since ZXing's format writes a semicolon inside a password as \;. The tool does not connect you.

Why does a white-on-black code fail with the camera?

Camera mode only looks for dark modules on a light background. Upload a photo or screenshot instead, since uploads also try an inverted copy.

Why can a photo of a QR code fail when a screenshot works?

Grain made the difference in our test. A smooth 4,032 x 3,024 picture with the code in it was read in 383 to 484 ms in all four browsers we tried. With heavier grain the scanner searched for 44 to 108 seconds and reported no code, although the code was there. Cropped to 1,000 x 1,000 around the code, the same picture was read in 515 to 1,033 ms, while a looser 2,016 x 1,512 crop was not. Crop Image can cut a photo down to the code first.

Which image files can the scanner open?

PNG, JPEG (CMYK too), WebP, GIF, BMP, AVIF, ICO and the generator's SVG were read in Chrome 156, Chromium 153, Firefox 155 and the WebKit build. TIFF, HEIC and a PDF of the code were read only in the WebKit build; the other three showed "Couldn't read this image file. Please try a different one." HEIC to JPG and PDF to JPG turn those into JPEGs first. A text file renamed .png got the same message, and a 0-byte file the empty-file notice.

Does a higher error correction level help with a scratched code?

In our damage test it did. With whole rows of modules wiped across the middle, levels L and M failed at one row, Q still read with three and H with six. Covering one corner stopped all four levels. The level is fixed when the code is made, so this scanner cannot change it.

Why can Open Link point to a different address than the box shows?

The box shows the text as it is stored in the code, and the button uses the address as the browser parses it. A link spelled with a Cyrillic а pointed to https://xn--exmple-4nf.com/login, and https://example.com@example.net/login pointed to the host example.net. In that last example the name before the @ was not the site the button opens.

Why does one QR code PNG read and another of the same size not?

In our test the width of each module mattered more than the size of the file. When a generator stretches a code to a width that is not a whole multiple of its module count, some modules come out a pixel wider than others; drawn that way, 66 of 200 test codes were not read, even one at 1,000 px. The same codes with every module the same whole number of pixels were all read. Our QR Code Generator draws them that way, so its PNG can differ from the slider value by a few pixels.

Related Tools