Nhà > Hướng dẫn > Máy quét mã QR hoạt động như thế nào?
Điện thoại quét mã QR

Máy quét mã QR hoạt động như thế nào?

Understand how QR code scanners work through image capture, pattern detection, and error correction to decode black-and-white modules into human-readable data.
Updated on Tháng 6 10, 2026
Mục lục

Ever wondered what’s actually happening in the half-second between pointing your phone at a QR code and landing on a webpage? The process is faster than it looks, and understanding it helps you create codes that scan reliably every time.

What a QR Code Actually Is

A QR code is a two-dimensional matrix of black and white squares arranged in a unique pattern. Unlike a traditional barcode – which encodes data in a single horizontal line of varying bar widths – a QR code stores information both horizontally and vertically. That’s what gives it far greater data capacity and makes it readable from multiple orientations.

Each QR code is built from several functional regions:

  • Finder patterns – the three large squares in the corners that help the scanner locate the code, determine its orientation, and find its edges, even when the code is tilted
  • Timing patterns – alternating black-and-white modules running between the finder patterns that define the grid structure and help the scanner correctly size each module
  • Quiet zone – the blank white margin surrounding the code, at least four modules wide, which separates it from surrounding graphics so the scanner can detect its boundaries
  • Format information – a dedicated area near the finder patterns that stores the error correction level and masking pattern so the scanner knows exactly how to interpret the data
  • Data modules – the individual black-and-white squares where the actual encoded content lives, read as binary ones (black) and zeros (white)

The data in those modules can be encoded in several modes: numeric only, alphanumeric, 8-bit binary bytes, or Kanji. A Version 1 QR code is 21×21 modules; a Version 40 code expands to 177×177 and can hold up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data. Learn more about how these trade-offs work in the guide to Giới hạn dữ liệu mã QR.

The Scanning Process, Step by Step

When you point a camera at a QR code, a multi-stage process unfolds in milliseconds.

QR scanning process

Step 1: Image Capture

The camera captures the two-dimensional grid as a visual image. This is the raw input – a photograph of the black-and-white pattern. Most modern smartphone cameras can handle this without any dedicated scanning app. If you want to understand the full range of ways to trigger a scan across different devices, the guide to scanning QR codes covers iPhone, Android, tablet, and desktop workflows in detail.

Step 2: Pattern Detection

The scanner’s software uses pattern recognition to locate the QR code within the image. It searches for the three finder patterns in the corners. Once found, the scanner determines:

  • Where the code is positioned in the frame
  • Which direction it’s oriented (even if rotated or slightly skewed)
  • Where the edges of the code are

This step is why QR codes remain readable at an angle – the finder patterns give the algorithm enough geometry to correct for distortion.

Step 3: Grid Sampling and Data Extraction

With the code’s position and orientation established, the scanner reads the timing patterns and alignment markers to understand the grid structure. It then samples each module in a specific zigzag path – right to left, up then down – starting from a known position and working through every data module until the end indicator is reached.

As it traverses this path, the scanner reads:

  • A mode indicator (four modules) that specifies the encoding type – numeric, alphanumeric, byte, or Kanji
  • A character count indicator that states how many characters are encoded
  • The remaining data codewords until the end of the data stream

Step 4: Error Correction

After reading the data modules, the scanner processes the error correction codewords. QR codes use Reed–Solomon error correction, which embeds redundant data that allows the original content to be reconstructed even when part of the code is physically damaged or obscured.

There are four standardized error correction levels:

Cấp độ Khả năng phục hồi Best Used For
L (Thấp) ~7% Clean indoor environments
M (Trung bình) ~15% General marketing materials
Q (Tứ phân vị) ~25% Industrial or outdoor use
H (Cao) ~30% Codes with logos, harsh conditions

Higher error correction means the code can survive more damage but also requires more modules, making the overall symbol denser. If you’re adding a logo to a QR code or placing it somewhere exposed to weather, choosing Level H is the right call. For a deeper look at how this trade-off plays out in practice, see the article on cách sửa lỗi hoạt động trong mã QR có thể chỉnh sửa.

Step 5: Decoding to Human-Readable Content

Once the data bits are reconstructed, the scanner decodes the binary sequence according to the QR code’s encoding mode. Black squares become ones and white squares become zeros. That binary string is then converted into human-readable content – a URL, a phone number, a block of text, contact information, or any other data type the code was originally built to carry.

If the code contains a URL, your device surfaces a prompt to open it. That’s the moment the scanning process hands off to your browser or app.

Try Pageloot’s Free QR Code Scanner Need to decode a QR code directly from an image or your webcam? The Máy quét mã QR Pageloot works in any modern browser – no app download required.

How QR Scanners Differ from Barcode Scanners

The underlying physics are similar: both types of scanner illuminate a pattern, detect reflected light, and decode the result. But a standard laser barcode scanner reads in a single horizontal line, which is why it can only handle 1D barcodes. Reading a 2D QR code requires an image-based sensor that captures the full pattern at once.

For a direct comparison of how these two formats differ in capability and use case, the barcode scanner explainer covers the illumination system, sensor, and decoder components in detail – and the barcode vs. QR code comparison breaks down which format makes more sense for different business applications.

What Makes a QR Code Easy (or Hard) to Scan

Understanding the scanning process reveals why certain design choices hurt readability:

  • Độ tương phản thấp – the scanner distinguishes modules by the difference in light reflection between black and white areas; a code printed in grey on a pale background fails this test
  • Missing quiet zone – without a clear white margin, the scanner can’t reliably locate the code’s edges, especially if surrounding text or graphics are close
  • Too small for the viewing distance – a 10:1 rule applies: for every 10 cm of scanning distance, the code should be at least 1 cm wide; the practical minimum for close-range print use is 2×2 cm
  • Inverted or unconventional colors – light modules on a dark background can confuse pattern recognition in some scanners
  • Blurry or pixelated output – low-resolution raster images fall apart at print scale; vector formats like SVG or EPS stay crisp at any size

For comprehensive guidance on sizing, contrast, placement, and testing, the article on các phương pháp hay nhất về khả năng đọc mã QR covers each factor with specific recommendations.

QR scan readability

Create Codes Built to Scan Các trình tạo mã QR Pageloot lets you build, customize, and test QR codes with the right error correction, contrast, and format for your specific use case – and dynamic codes can be updated after printing without generating a new image.

Static vs. Dynamic QR Codes: What the Scanner Sees

From the scanner’s perspective, every QR code looks the same: a matrix of modules encoding a string of data. The difference between static and dynamic codes is what that data contains.

A mã QR tĩnh encodes the final destination directly – the full URL, text, or contact information is baked into the modules at creation time. Changing the content means generating a new code.

A mã QR động encodes a short redirect URL that points to a server. When scanned, that redirect forwards the user to whatever destination the code owner has currently set. This means the physical code never changes, but its behavior can be updated instantly. Dynamic codes also enable scan tracking – every scan registers a data point that shows when and where the code was scanned, on what device, and how often.

If a QR code campaign needs to be measurable or the linked content might change, dynamic codes are the practical choice. For businesses comparing the full range of scanner app options and what to look for in a scanning tool, the QR code scanning apps comparison covers the major options.

Các câu hỏi thường gặp

Tôi có cần một ứng dụng đặc biệt để quét mã QR không?

No. Most smartphones running iOS 11 or later and modern Android devices can scan QR codes directly through the native camera app. For more control – such as scanning from a saved image or checking scan history – a dedicated tool like the Pageloot QR scanner works from any browser without installation.

Why does my QR code scan on some devices but not others?

The most common causes are low contrast, a missing quiet zone, a code that’s too small for the viewing distance, or an image that’s too blurry to resolve the modules. Older devices with lower-resolution cameras are more sensitive to these issues. Testing across multiple devices before printing, and using higher error correction levels (Q or H), reduces the chance of failures. See the full list of causes and fixes in the QR code not working guide.

How much data can a QR code hold?

A Version 40 QR code at the lowest error correction level can encode up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data. In practice, shorter URLs and simpler content produce less dense codes that scan faster and more reliably. The full breakdown of version, capacity, and error correction trade-offs is covered in the QR code data limits guide.

Giới thiệu về tác giả

Siim Kostabi là Trưởng nhóm Nội dung tại Pageloot. Anh ấy viết về dịch vụ tạo mã QR tiên tiến của chúng tôi. Với kinh nghiệm sâu rộng hơn nửa thập kỷ về mã QR, Siim là một chuyên gia trong lĩnh vực này. Anh ấy đã có những đóng góp đáng kể trong việc tận dụng công nghệ QR để đơn giản hóa và nâng cao tương tác kỹ thuật số.

Danh mục
Học nhiều hơn về
Khách hàng quét mã QR thanh toán
Mã QR cho Thanh toán

Nếu bạn cần tạo Mã QR trực tuyến, bạn có thể Tạo mã QR ngay tại đây miễn phí!
Pageloot là Giải pháp Đi tới #1 để tạo và quét Mã QR.

HT-32

quét blog

Được hơn 20.000 thương hiệu tin dùng để có thêm doanh số, đánh giá và người theo dõi.

Logo khách hàng
Được tin cậy bởi các thương hiệu hàng đầu
Được đánh giá 4.8 trên 5

Đánh giá 4.86 / 5 sao

Hugo Laurent
Hugo Laurent
Chủ nhà hàng
Trình tạo mã QR dễ dàng và đáng tin cậy nhất từ trước đến nay. Các tệp PDF có thể được tải lên ngay lập tức. Thực đơn nhà hàng của chúng tôi bây giờ là kỹ thuật số.
Lucas Jansen
Lucas Jansen
Nhà phát triển bất động sản
Đây là một công cụ tuyệt vời và mã QR sẽ đưa bạn đến nơi bạn muốn. Chúng tôi chỉ sử dụng mã QR vị trí nhưng có rất nhiều tính năng hữu ích.
Emma Moretti
Emma Moretti
Sản phẩm bán lẻ
Dễ dàng sử dụng và nhanh chóng. Nó hoạt động tuyệt vời và tạo ra một hình ảnh hoàn hảo, vì vậy nhân viên có thể tải xuống vCard của tôi.
Hugo Laurent
Hugo Laurent
Chủ nhà hàng
Trình tạo mã QR dễ dàng và đáng tin cậy nhất từ trước đến nay. Các tệp PDF có thể được tải lên ngay lập tức. Thực đơn nhà hàng của chúng tôi bây giờ là kỹ thuật số.
Lucas Jansen
Lucas Jansen
Nhà phát triển bất động sản
Đây là một công cụ tuyệt vời và mã QR sẽ đưa bạn đến nơi bạn muốn. Chúng tôi chỉ sử dụng mã QR vị trí nhưng có rất nhiều tính năng hữu ích.
Emma Moretti
Emma Moretti
Sản phẩm bán lẻ
Dễ dàng sử dụng và nhanh chóng. Nó hoạt động tuyệt vời và tạo ra một hình ảnh hoàn hảo, vì vậy nhân viên có thể tải xuống vCard của tôi.
Xem thêm mã QR
Hành khách quét mã QR sân bay
Mã QR cho Các hãng hàng không & sân bay
Quét mã QR Telegram
Tạo mã QR cho Nhóm Telegram
Biến mọi thứ thành trải nghiệm kỹ thuật số trong vòng chưa đầy 3 phút.

Dùng thử miễn phí 14 ngày.

Không cần thẻ tín dụng.

Giảm giá 30% cho lần mua hàng đầu tiên của bạn

Sử dụng mã:

Chia sẻ tệp MP3 của bạn

Đăng ký tạo mã QR PDF

Tải lên và hiển thị mọi thứ bạn cần:

  • Tập tin âm thanh
  • Podcast
  • Âm nhạc

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

đăng ký để tạo mã QR âm thanh mp3

Nhận thêm lượt quét với khung

Đăng ký để thêm nhiều khung hơn vào mã QR của bạn

Khung kêu gọi hành động giúp khách hàng của bạn tương tác với QR Code một cách dễ dàng. Thử chúng ra!

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để thêm nhiều khung hơn vào mã QR của bạn

Thêm phong cách với hình dạng

Đăng ký để tạo nhiều hình hơn

Mã QR không nhất thiết phải là hình vuông. Hãy thử thay đổi nó để phù hợp với hình ảnh thương hiệu của bạn.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để tạo nhiều hình hơn

Thêm logo vào Mã QR của bạn

Đăng ký để thêm logo của bạn vào mã QR

Làm cho mã QR của bạn nổi bật bằng cách thêm logo và thương hiệu của bạn vào đó.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để thêm logo của bạn vào mã QR

Chuyển hướng thông minh đến App Store

Đăng ký tạo mã QR cửa hàng ứng dụng

Thêm liên kết Ứng dụng của bạn vào Mã QR App Store thông minh của chúng tôi. Người dùng được chuyển hướng dựa trên thiết bị của họ.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký tạo mã QR cửa hàng ứng dụng

Tải ảnh lên Mã QR

Đăng ký tạo mã QR hình ảnh

Chia sẻ hình ảnh của bạn một cách dễ dàng. Thay đổi bất kỳ hình ảnh nào một cách linh hoạt trong vòng vài giây.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký tạo mã QR hình ảnh

Chia sẻ tệp PDF của bạn

Đăng ký tạo mã QR PDF

Tải lên và hiển thị mọi thứ bạn cần:

  • Thực đơn & bảng giá
  • Hướng dẫn
  • Mọi tài liệu

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký tạo mã QR PDF

Chỉnh sửa sau mà không cần in lại

Đăng ký để chỉnh sửa mã QR của bạn mà không cần in lại

Mã QR động cho phép bạn thay đổi nội dung của Mã QR mà không cần phải in mã mới.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để chỉnh sửa mã QR của bạn mà không cần in lại

Khi nào? Ở đâu? Theo dõi lượt quét Mã QR của bạn

Đăng ký để theo dõi mã QR của bạn

Khám phá những Mã QR nào của bạn nhận được nhiều lần quét nhất và điều gì khiến khách hàng của bạn phấn khích nhất.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để theo dõi mã QR của bạn

Tệp sẵn sàng để in có sẵn

Đăng ký tạo mã QR vector như PDF và SVG

.EPS, .PDF, .SVG

Bạn muốn tải xuống Mã QR của mình ở độ phân giải HD? Nhận các định dạng vector hoặc pixel đã sẵn sàng để in.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký tạo mã QR vector như PDF và SVG

Vui lòng chờ. Mã QR của bạn là Đang tải... Đang tải...

Tùy chỉnh theo ý bạn

Đăng ký để lưu mã QR của bạn cho lần sau

Nhận được nhiều lượt quét hơn bằng cách tạo Mã QR tuyệt vời với các màu sắc, biểu trưng và khung kêu gọi hành động khác nhau.

Dùng thử miễn phí 14 ngày khi đăng ký.
Mã QR hết hạn sau thời gian dùng thử.

Đăng ký để lưu mã QR của bạn cho lần sau