QR code reader
Scan with the phone camera or drag a code image in (a pasted screenshot works too): it extracts the URL, Wi-Fi, vCard or plain text and marks the code on the original picture.
摄像头扫码(手机上推荐)
对准二维码即可自动识别,画面只在你浏览器里解码、不上传。微信内置浏览器不提供摄像头接口,在微信里请用下方的粘贴截图,或换系统浏览器打开本页。
调用手机系统相机拍一张,回来立刻在本机识别;任何浏览器和微信里都能用,照片不出设备。
把二维码图片拖到这里,或点击选择
支持 PNG / JPG / WebP,可多选(一次识别多张);也可以直接按 Ctrl+V 粘贴截图
图片只在本机解码,不会上传:二维码里可能写着你的 WiFi 密码或公司内部链接,本地识别才不会把它们发到别人的服务器上。
待识别的图片
二维码图片是怎么被「读」出来的?
二维码里存的其实是一串字节:黑白小方块叫「模块」,每一块代表 0 或 1。图片四周那圈更大的三个方形是定位图案,解码程序先找到它们,就能算出这张图有没有被旋转、拉斜,然后把网格对齐回标准的行列。接着读出版本号、纠错等级和掩码信息,按规则把掩码还原,最后按编码模式(数字 / 字母数字 / 字节 / 汉字)把比特流翻译回原始内容。所以你看到的「扫码结果」并不是图片里画着字,而是解出来的一段数据——它可能是网址,也可能是 WiFi 配置、联系人名片,甚至是一段二进制。
为什么有的二维码图片识别不了:最常见的是模糊——拍照手抖或对焦在别处,模块边缘糊成一片,定位图案还在但每个格子的明暗已经分不清了;其次是反光与遮挡,屏幕翻拍时一片高光会直接吃掉几十个模块,贴纸、水印压在二维码上同理;第三是太小,二维码在原图里可能只占 60×60 像素,而一个模块只分到 1~2 个像素,这时候把它裁出来放大反而更容易读(放大虽不增加信息,但能让采样落回模块中心);第四是静默区被裁掉了,二维码四周需要留白(通常 4 个模块宽),很多人在截图或抠图时贴着边缘裁,定位图案与背景的边界消失,解码器就找不到二维码了。另外还有一种常被误会的情况:那是一维条形码而不是二维码——条形码只有一排粗细不同的竖线,本工具只识别二维码。
截图识别是最高频的用法:在电脑上遇到「二维码图片」时,绝大多数场景就是你刚截的图——微信/QQ 截图、系统截图工具、网页上的二维码另存。这类图片往往清晰、没有透视变形,识别率极高。本页支持直接按 Ctrl+V 粘贴:截图后不用先存盘、不用再选文件,直接粘贴即可读出内容。如果二维码本身太小,可以先用Image crop把二维码区域裁出来(记得四周留一点白边),再粘贴或上传,成功率会明显上升;手机拍的大图也可以先压缩到合适体积再识别。
手机还能用摄像头直接扫:在系统浏览器里打开本页,点「开始摄像头扫码」,允许权限后对准二维码即可自动识别。页面按最长边 800 像素抽帧、用自托管的 jsQR 逐帧本地解码(这个分辨率下逐帧耗时足够低,扫码体验接近原生);视频画面不会上传到任何服务器,停止扫码或离开页面时摄像头立即关闭。微信内置浏览器不提供摄像头接口,那种情况下请用下方的粘贴截图,或换系统浏览器打开本页。
为什么识别必须在本地做:二维码承载的内容往往比一张普通图片敏感得多——家庭或办公室的 WIFI: 二维码里直接写着 SSID 和密码,很多人的做法是把它打印出来贴在墙上或存进相册;企业内部二维码可能指向内网地址、带签名参数的临时链接、含手机号的加好友链接。如果把这些图片上传到「在线解码」服务器,等于把 WiFi 密码和内部链接原样交出去,而且很多站点会留存上传文件与识别记录。本页的解码完全在你的浏览器里完成(用的是本地加载的 jsQR 解码库),图片识别与摄像头扫码两条路都不会发出任何文件上传请求——你可以打开开发者工具的 Network 面板,把图片拖进来或开摄像头,看是否出现新的上传请求。
FAQ
Troubleshoot in this order - step two usually fixes it: ① confirm the image really contains a QR code (not a barcode) and the code is not tiny (tens of pixels); ② use our 'image crop' tool to cut the QR code out with a small white margin around it (the quiet zone, normally 4 modules wide) - do not crop flush to the edge; ③ try a sharper image - glare when photographing a screen, lens distortion and hand shake all blur the module edges; ④ if the code is on a curved mug or a folded card, reshoot it head-on. The page first tries recognition on a version sampled to 1600px on the longest edge; if that fails it retries at the original size, and only after both attempts does it report 'not detected'.
You can click it, but look at the domain first: the link comes from the QR code, so check the source before opening. Anyone can generate a QR code, and people do put fake login pages, phishing sites and pages disguised as 'WiFi sign-in' on posters in public places. This tool only reads the content faithfully - it does not judge safety and never navigates automatically.
Yes. Besides picking an image file, you can press Ctrl+V to paste a screenshot straight in - the most convenient way to read a QR code on your screen.
Yes. The sharing codes phones generate use the format WIFI:T:WPA;S=network;P=password;;, and this page splits it into network name, encryption type and password displayed separately. Note that the password here is plain text - one reason we insist on local decoding: if you only want to know 'which WiFi does this sticker join', there is no need to upload the password to any server.
Phone photos are easily 4000×3000 pixels (about 12 MP); scanning them pixel by pixel uses a lot of memory and is slow while barely helping accuracy - what decides success is how many pixels the QR region still has after sampling. So the page first shrinks the longest edge to 1600px and recognizes that; if nothing is read, it retries once at the original size, and only after two failures does it report 'not detected', honestly labelling the size that actually took part in recognition.
HEIC is not supported - it is the iPhone default photo format and browsers cannot decode it. Convert first with our 'HEIC to JPG' tool (photos are processed locally in the browser, not uploaded), then come back here. Barcodes (1D) are also unsupported: their encoding is completely different from QR codes, and this tool only reads QR codes. If an image contains both, the QR code is still read normally.
Yes. Open this page in the phone's system browser, tap 'Start camera scanning', allow the permission, and point at the code - recognition is automatic, and the frames are decoded only in your browser, never uploaded. The WeChat in-app browser provides no camera API: inside WeChat use the paste-screenshot box below, or open the page in the system browser.
Recognition is a purely local process: the decoder jsQR is self-hosted by this site and loaded once on first use (about 250KB); once loaded, per-frame decoding emits no image data at all, and the camera closes immediately when you stop scanning or leave the page.