Barcode reader
Drop an image, paste a screenshot, take a photo or scan live — it reads the 1D barcode
图片识别(支持批量,也可 Ctrl/⌘+V 粘贴截图)
把条形码图片拖到这里,或点击选择(JPG / PNG / WebP / BMP / GIF)
一次最多 20 张;识别库首次加载约需 1 秒(gzip 后约 110KB,之后不再加载)
调用手机系统相机拍一张,回来立刻在本机识别;任何浏览器和微信里都能用,照片不出设备。
手机摄像头直扫(视频帧只在浏览器里解码)
扫码中自动识别、命中震动提示、连续扫自动累积,不用一直点按钮。这里要求:https 页面 + 系统浏览器(微信、QQ、UC、夸克、百度以及 App/小程序里的内置网页不向网页开放摄像头接口)。不满足时按钮保持灰色并写明原因;个别内核没有内置快速识别接口时,点「开始」会说明原因,请改用上方「拍照识别」。
支持哪些条形码?识别不出来怎么办?
支持的编码(一维码): CODE128、CODE39、EAN-13(商品条形码)、EAN-8、UPC-A、UPC-E(美式商品码)、ITF / ITF-14(物流箱码)、CODABAR(血库 / 物流)、MSI(仓储资产编号)、Pharmacode(药品包装)。 二维码(QR)是二维编码,不在这页——请用本站「二维码识别」;一张图里同时有一维码和二维码时,本页只读一维码。
识别不出来按顺序排查: ① 图要够清晰、码条边缘分明——翻拍屏幕的高光、摩尔纹、手抖都会糊掉码条; ② 条形码四周留一点空白(静默区),别贴着图边裁; ③ 码太小就先用「图片裁剪」把条形码区域裁出来、放大再识别; ④ 把图摆正成水平方向再试,引擎对横条码条最稳。
与「条形码生成」互验: 本站「条形码生成」工具能生成 CODE128 / CODE39 / EAN-13 / UPC-A / ITF-14 五种,全部在本页识别范围内——生成后下载再识别,可以完整往返校验。
隐私。 识别全程在你的浏览器里完成:图片、拍照照片与摄像头视频帧都只在本机解码,本站任何时刻都没有获得它们(打开开发者工具 Network 面板可核验零上传请求)。 图片解码库(html5-qrcode 2.3.8)由本站自托管,首次图片识别时加载一次(gzip 后约 110KB),之后浏览器缓存复用;摄像头直扫使用浏览器内置的识别接口(BarcodeDetector),视频帧只在你设备的内存里逐帧检测。
FAQ
1D codes: CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF / ITF-14, CODABAR, MSI (including checksum variants such as MSI10 / MSI11), Pharmacode and other common symbologies. QR codes are not supported on this page - that is 2D encoding, use our 'QR code reader' page; if one image contains both a 1D and a 2D code, this page reads only the 1D one.
Check in order: 1) the image must be sharp with crisp bar edges - screen glare, moire patterns and handshake blur from photographing a screen all smear the bars; 2) leave some white margin (the quiet zone) around the barcode, do not crop flush to it; 3) if the code is tiny, first use 'image crop' to cut out just the barcode area and enlarge it; 4) straighten the image to horizontal before trying - the engine is most reliable on upright horizontal bars.
Yes, but only in the phone's system browser (Safari / Chrome / Huawei / Xiaomi browser) and on an https address - browsers only let secure pages use the camera. When both hold, tap 'start camera scan' and aim at the barcode for automatic recognition: video frames are decoded only inside your browser and never uploaded; the camera closes immediately when you stop or leave the page. If the button is greyed out, the page states the reason right below it - most commonly you are inside an app's built-in browser (see the next question); if you would rather not fiddle, just use 'photo capture'.
The camera API exists only when two conditions hold together: 1) the page is https; 2) you are in the system browser. Webview kernels bundled inside WeChat, QQ, UC, Quark, Baidu and the like, as well as pages embedded in our app or mini-program, expose no camera interface to the page - even with an https address (this is not a fault of ours; any web-based scanner behaves the same). Two ways out: use the top-right menu 'open in browser' to reopen this page in your phone's stock browser, or just tap 'photo capture' above, which invokes the system camera to take a picture that is then recognized locally the same way - this path works in every browser and inside WeChat too.
Yes. Every symbology the generator can currently output - CODE128 / CODE39 / EAN-13 / EAN-8 / UPC-A / ITF / ITF-14 / MSI / Pharmacode / Codabar - is within this page's recognition range; short ITF, Codabar, MSI and Pharmacode are decoded by this page's own built-in reader (the general-purpose library happens to lack exactly these), so generate, download and re-recognize for a full round-trip check. CODE93 is disabled on the generator side (the bundled drawing library does not support it).
No. Recognition is purely local: the decoding library is self-hosted by this site and loaded once on first recognition (about 110KB after gzip); after it loads, images, captured photos and video frames never leave the device - you can verify in the Network panel.