How to scan a barcode on a PC
- With a webcam: click Start camera, allow access, and hold the barcode 20 to 30 cm from the camera.
- With a USB scanner: click the USB scanner test box further down and scan; the value appears with its speed and suffix key.
- Copy the result, look it up, or switch to Batch mode and download the list as Excel or CSV.
Quick answer: a PC can scan barcodes two ways. A webcam works through this page with nothing to install. A USB barcode scanner is faster and acts like a keyboard, typing each code wherever your cursor is.
Webcam or USB scanner?
| Webcam (this page) | USB / Bluetooth scanner | |
|---|---|---|
| Cost | Free, uses the camera you have | Roughly the price of a keyboard for a basic 1D model |
| Speed | About a second per code | Near instant, point and pull the trigger |
| Small 1D barcodes | Hard for fixed-focus webcams | Easy |
| QR and Data Matrix | Easy | Needs a 2D imager model |
| Where the data goes | A list on this page, export to Excel or CSV | Typed into any program |
How USB keyboard-wedge scanners work
Plug a typical USB scanner into Windows and it shows up as a keyboard. When you scan, it types the barcode’s characters in a burst (often 50 or more characters per second) and then presses Enter. That’s why it works in any program. The test box above measures that burst and warns about the usual setup problems: a keyboard layout mismatch that turns digits into symbols, Caps Lock swapping case, or a missing Enter. The full barcode scanner test adds printable test codes for 1D, GS1 and 2D scanners.
Webcam tips for Windows and Chromebook
- Hold the barcode 20 to 30 cm away, square to the camera, and let it be small rather than blurry.
- Light the label from the front. A desk lamp beats the screen’s glow.
- If you have an external webcam with autofocus, choose it from the camera list under the video.
- A barcode in a PDF or email? Take a screenshot (Windows: Win+Shift+S) and paste it into scan barcode from image.
Scanning into a spreadsheet
In Batch mode, codes from the webcam and from a USB scanner typed into the “Type a code” box go into one list with quantities. Download it as a real Excel file, which keeps leading zeros, or as CSV. On a Mac? See the barcode scanner for Mac.
Frequently asked questions
Can I scan barcodes with my laptop webcam?
Yes. Open this page in Chrome, Edge or Firefox on Windows, a Chromebook or Linux, click Start camera and hold the barcode up to the webcam. QR and Data Matrix codes read easily. Small 1D barcodes need good light and should be held about 20 to 30 cm away, because most webcams can’t focus closer.
Do I need software for a USB barcode scanner?
Usually not. Most USB scanners act as a keyboard: they type the barcode into whatever has focus and press Enter. They work in Excel, Notepad, web forms and point-of-sale software without drivers. Use the test box on this page to check yours.
Windows says no camera is available. What should I check?
Open Settings › Privacy & security › Camera and make sure camera access is on, including “Let desktop apps access your camera”, since browsers count as desktop apps. Close other apps that may be using the camera (video calls), then reload the page.
Why is my webcam so bad at reading barcodes?
Many built-in webcams have fixed focus set for a face at arm’s length, so a barcode held close is blurry. Hold it further away, add light, and prefer QR or larger barcodes. An external webcam with autofocus, or a cheap USB scanner, is much faster for regular use.
Can I scan barcodes into Excel on my PC?
Yes, two ways. With a USB scanner, click a cell and scan; each code lands in a cell and Enter moves down. With a webcam, use Batch mode here and download an .xlsx file. See scan barcodes to Excel.
Does it work on a Chromebook?
Yes. Chrome on ChromeOS supports the camera and includes a fast built-in barcode detector. USB and Bluetooth scanners also work as keyboards.
Is anything uploaded?
No. Webcam frames are decoded in the browser on your PC, and the USB test runs locally too.