كيف تعمل
A QR code is a two-dimensional grid of modules — the black and white squares — with three large finder patterns in the corners that let a scanner determine orientation and scale. Data is encoded with Reed-Solomon error correction, which adds redundant codewords so that a damaged or partly obscured symbol can still be decoded. There are four levels: L recovers about 7 percent of the symbol, M about 15 percent, Q about 25 percent and H about 30 percent. A higher level means more redundancy, which means more modules for the same payload, which means a denser code that needs more space to scan reliably.
The payload is just text, and the format of that text is what gives the code its behaviour. A plain URL opens a browser. A string beginning WIFI: with the right fields joins a network. A vCard payload adds a contact when scanned. The MECARD and vCard formats are both used for contacts and are not interchangeable across all scanners. Field values must be escaped: a semicolon, comma or backslash inside a Wi-Fi password or a contact name terminates the field early and produces a code that scans into garbage, which is why escaping is applied automatically here rather than left to the user.
Capacity is the constraint that shapes every other decision. A QR symbol has a maximum of 177 by 177 modules at version 40, and the amount of data it can carry depends on the error-correction level and on the character set: numeric data packs most densely, then alphanumeric, then bytes, then kanji. In practice a URL of around 100 characters at level M fits comfortably, while a 500-character payload produces a very dense code that a phone camera struggles to resolve on a screen or a printed label. Shorter is better, and a URL shortener is often the right answer for a long link.
Scanning reliability is a physical property as much as a digital one. The quiet zone — the margin of blank space around the symbol, specified as four modules — is required by the standard and is the first thing a badly designed poster removes. Contrast matters more than colour: dark modules on a light background scan reliably, while an inverted code works on some scanners and not others. Placing a logo in the centre overwrites modules, which is why it should be used only at level Q or H, and why the logo should cover no more than a quarter of the width.
حالات الاستخدام الشائعة
- Put a Wi-Fi network's credentials on a card so guests can join without typing a password.
- Create a vCard code for a conference badge or a business card.
- Generate a code for a restaurant menu, a product page or an app download link.
- Encode a location or an event with its start and end times for a poster.
- Decode a QR code from a screenshot to check where it actually points before scanning it.
- Produce an SVG code for print at large sizes without the pixelation a bitmap would show.
آخر تحديث: 2026-10-14 — يُعرض متن المقال بالإنجليزية، بينما الواجهة مترجمة.