How to Read a QR Code from the Camera or an Image
By Tools Star Hub Editorial Team · Published · Updated
To read a QR code on this site, start the camera or upload a PNG, JPG, or WebP image. The scanner decodes the first code it finds, then stops the camera. It does not open a link by itself. If the text looks like a URL, an Open link control appears and you choose whether to use it. Frames and uploaded images are decoded in the tab.
A code can contain a URL, a Wi-Fi setting, or plain text. Opening it automatically would follow whatever was encoded. Reading it first lets you copy the text, check the address, or ignore it. Upload still works when the camera is blocked.
When does the camera turn on?
The camera stays off until you press Start camera. The browser then asks for permission. Facing the rear camera is requested when the device has one. Stop camera ends the stream. Leaving the page stops it too.
If permission is denied, the page says you can still upload an image. If no camera is found, it says to upload an image. If the browser has no camera API, it says to upload an image. None of those cases decode a code from the room on their own.
How does an image upload work?
The file control accepts JPEG, PNG, and WebP. The image is drawn to a canvas in the tab and passed to the decoder. A photo with no QR code says No QR code was found in that image. A file that is not a readable image says that file could not be read as an image.
The scan returns the first code in the frame or the file. It does not list every code on a sheet. Crop the image to one code if several are visible and you need a specific one.
What should you do with the text?
The result is shown as text you can copy. A value that looks like a URL gets an Open link control with a new tab. You press it. The scanner does not navigate by itself. A code that is not a URL has no open control.
Creating a code is a different page. The generator accepts up to 1,200 characters, uses error correction level M, a margin of 2, and a width of 320, and downloads a PNG. Scanning that PNG should return the text you encoded, as long as the image is clear.
A blurry photo, a code that is cut off, or a heavy glare can fail even when you can see a pattern. The error is still No QR code was found in that image. Move closer or crop tighter and try the file again. The scanner does not guess a partial code.
How to read a QR code
- Choose camera or file. Press Start camera only if you want the camera on. Otherwise upload a PNG, JPG, or WebP.
- Hold one code in view. The scanner stops at the first code it decodes. Crop a busy image down to the code you want.
- Read the text. Copy it if you need to keep it. Check a URL before you open it.
- Open a link only on purpose. Use the Open link control when you trust the address. Reset clears the result and the file name.
Example
A link inside a code
If the decoded text is a URL, the page shows the full text and an Open link control. Nothing is opened until you use that control.
A photo with no code
Uploading an image that has no QR code clears any old result and says No QR code was found in that image.
Common mistakes
The camera is opt-in
Opening the page does not start the camera. Press Start camera, and allow permission if you want a live scan.
The first code wins
A sheet of codes returns one result. Crop to the code you mean to read.
FAQ
- Does the scanner open links automatically?
- No. It shows the text. If the text looks like a URL, you can press Open link. Until then the page stays put.
- Which image types work?
- JPEG, PNG, and WebP. Upload works even when the camera is blocked.
- What if permission is denied?
- The page says camera permission was denied and that you can still upload an image.
- Can it read several codes in one picture?
- It returns the first code it finds, then stops. Crop the image if you need a different code.
- Are frames uploaded?
- No. Frames after Start camera, and a PNG, JPG, or WebP you choose, are decoded in this tab.
To decode a code from the camera or an image, use the QR Code Scanner. It waits for you to start the camera.
Campaign links are ordinary URLs. See How to create a UTM URL.
To split a decoded address into parts, read How to read a URL.