Barcode Scanner & Decoder
Use your camera or upload an image to read UPC, EAN, Code 128, Code 39, ITF, and Codabar—fast, private, and free. Also reads QR codes.
Scanner & Decoder
Decoded Result
No result yet. Use Scan or upload an image.
Turn any laptop or phone into a capable barcode reader. This tool decodes popular retail and logistics symbologies using two client-side engines: the Shape Detection API when available (hardware-accelerated on many devices) and a refined ZXing decoder as a fallback. Nothing is uploaded—detection and decoding run entirely in your browser for speed and privacy.
How Camera and Image Decoding Works
- Frame Capture: When you press Scan, the app samples a frame from your live camera stream (or the image you upload).
- Detection: We first try the Shape Detection API (BarcodeDetector) for fast on-device detection. If not supported or if it finds nothing, we fall back to ZXing compiled for the web.
- Decoding: The detected region is processed to recover the encoded data (UPC/EAN digits, Code 128/39 text, etc.).
- Results: The decoded payload and format appear below the preview. You can copy the text instantly.
- Privacy: All processing is local—no images or video frames leave your device.
Supported Barcode Formats
Format | Type | Typical Uses |
---|---|---|
EAN-13 / EAN-8 | 1D | Retail items in EU and many regions |
UPC-A / UPC-E | 1D | Retail items in North America |
Code 128 | 1D | Logistics, shipping labels, inventory IDs |
Code 39 | 1D | Manufacturing, asset tags, simple alphanumerics |
Interleaved 2 of 5 (ITF) | 1D | Cartons, pallets, distribution |
Codabar | 1D | Libraries, blood banks, older systems |
QR Code | 2D | URLs, tickets, payments, device pairing |
Camera Scanning Tips
- Light the code, not the lens: Use bright, diffuse light from the side to avoid glare and reflections. Tilt glossy labels or move the light to prevent washout.
- Use the torch when needed: On phones, enable the flashlight in dim environments. Angle the device slightly to reduce glare.
- Get the right distance: Move closer until the barcode fills 60–80% of the view. Too far = too few pixels; too close = poor focus.
- Focus and exposure: Tap the barcode to focus/auto-expose. Long-press on many phones to lock AE/AF.
- Orientation matters for 1D codes: Rotate so bars run horizontally across the screen. Try 90° or 180° if detection is stubborn.
- Keep it steady: Brace elbows, rest on a surface, or use two hands. A half-second pause improves results.
- Mind the quiet zone: Leave a thin white margin around the code—don’t crop right up to the bars.
- Reduce skew and curvature: Keep the code flat and camera parallel. For curved labels, step back to reduce distortion, then crop tighter.
- Prefer the main camera: Avoid ultra-wide lenses for small codes; use the main (1×) or telephoto camera.
- Avoid image-altering modes: Disable Portrait/Beauty/HDR/motion-blur modes that can soften fine bars.
- Clean the lens: Fingerprints and dust reduce sharpness and contrast.
- For QR codes: Keep the whole square (with quiet zone) visible and roughly straight; avoid partial crops of finder corners.
Best Results When Uploading Images
- Use suitable formats: PNG preserves crisp edges; JPEG is fine at high quality (≥ 85). Convert HEIC/HEIF to PNG or JPEG before uploading.
- Resolution matters: Small labels: ≥ 1000×1000 px. Larger codes: ≥ 600×600 px. Avoid digital zoom—move closer and crop.
- Keep it sharp: Brace the phone, tap to focus, and pause. Motion blur destroys thin bars and QR modules.
- Crop with a quiet zone: Crop around the barcode but leave a thin white margin; don’t crop into bars/modules.
- Fix orientation: If the image is sideways/upside-down, rotate it first—EXIF rotation isn’t always honored.
- Control lighting: Use bright, diffuse light; tilt slightly to move glare off glossy labels.
- Boost contrast (if needed): Convert to grayscale and raise contrast. Avoid heavy filters/noise-reduction that smear edges.
- Flatten and de-skew: For curved packages, step back, square to the code, then crop tighter.
- One code at a time: If a photo has multiple barcodes, crop to the single target code.
- Preserve the original: Upload the original file. Messaging apps often compress and add artifacts.
- From screens: Prefer direct screenshots. If photographing a display, lower brightness slightly to reduce banding.
- Try another device or lens: Use the main (1×) camera for best detail; ultra-wide can hurt decodability.
Troubleshooting Decoding Failures
- Confirm the symbology: Supported: EAN-13/8, UPC-A/E, Code 128, Code 39, ITF, Codabar, and QR. Not supported: Data Matrix, PDF417.
- Try different orientations: Rotate the code or device by 90° steps. For 1D barcodes, horizontal bars are easiest.
- Crop smarter: Crop around the barcode while keeping a thin white quiet zone. Don’t crop into the bars.
- Boost contrast: Improve lighting, avoid glare, aim for dark bars on a light background; for uploads, try grayscale with higher contrast.
- Watch for inverted colors: If bars are light on dark, re-photograph with more light or invert colors before uploading.
- Increase usable resolution: Move closer, use a higher-resolution photo, or switch to a better camera.
- Reduce skew/curvature: Flatten the label, square the camera to the code, or step back, then crop tighter.
- Check print quality and quiet zone: Smears, scratches, or missing quiet zones can prevent decoding. Try a cleaner sample.
- Validate data rules when relevant: Some formats have constraints (e.g., ITF even digits; Code 39 limited characters). Verify the code follows its rules.
- Device/browser variability: Try another device or browser. Enable torch; tap-to-focus and hold steady.
- Image uploads—orientation/processing: Rotate sideways photos before upload. Avoid heavy filters or noise reduction.
- Still stuck? Try a tighter crop, better lighting, and a second device. The code may be damaged or unsupported.
Privacy & On-Device Processing
This scanner runs entirely in your browser: camera frames and uploaded images never leave your device. Use it instantly—no sign-up and no tracking pixels. After the initial load, many browsers can run this tool even with a spotty or offline connection.