工具 指南
generators 免费 无需注册

二维码生成器

为网址、文本、Wi-Fi、联系人等生成自定义二维码 — 免费,无需注册。

正在加载工具…

关于此工具

在浏览器中即时生成可扫描的二维码。自定义颜色、纠错级别和尺寸。所有操作均在本地运行——您的数据不会离开您的设备。

使用方法

  1. 1 在输入框中输入URL、文字、Wi-Fi密码或联系人信息。
  2. 2 选择您偏好的纠错级别(L适用于小型码,H适用于防损坏)。
  3. 3 使用自定义选项调整颜色和尺寸。
  4. 4 点击"生成",然后右键点击二维码图片以保存或分享。

How a QR code actually stores your data

A QR ("Quick Response") code is a two-dimensional grid of black and white modules that encodes text — most often a URL, but also plain text, Wi-Fi credentials, contact cards, or payment strings. Unlike a one-dimensional barcode, which only stores a handful of digits along a single axis, a QR code packs data both horizontally and vertically, so even a small symbol can hold hundreds of characters. The three large squares in the corners are finder patterns: they let a camera locate and orient the code no matter which way you hold your phone, which is why a QR code still scans upside down or at an angle.

Every QR code also carries built-in error correction using Reed–Solomon codes. This is the feature that lets a scanner read a code even when part of it is dirty, crumpled, or covered by a logo. You can choose one of four levels:

LevelRecovers up toBest for
L (Low)~7% damageClean digital screens, short URLs
M (Medium)~15% damageGeneral printing — a good default
Q (Quartile)~25% damageCodes with a small center logo
H (High)~30% damageIndustrial labels, outdoor signage

Higher correction is safer but makes the grid denser, because the redundant data takes up modules too. If you plan to drop a logo in the middle, use level Q or H so the obscured area stays within the recoverable margin.

A worked example

Suppose you paste https://boxtool.app/en/tools/qr-code-generator/ into the box above. The generator measures the string (47 characters), picks the smallest QR version (grid size) that can hold it at your chosen error-correction level, lays down the finder and timing patterns, encodes the URL as alphanumeric data, appends the Reed–Solomon recovery bytes, and applies a mask pattern that balances the ratio of black to white modules so cameras don't get confused. The result renders instantly as an SVG or PNG — entirely in your browser, so the URL you encode never touches our servers.

Practical tips that prevent unscannable codes

  • Keep the quiet zone. A QR code needs a margin of empty space (about four modules wide) around it. Cropping right to the edge is the single most common reason a printed code fails to scan.
  • Mind the contrast. Dark-on-light is the safe choice. Inverted (light-on-dark) codes work on many modern phones but fail on older scanners, so test before committing to a print run.
  • Shorter URLs mean sparser grids. A long link forces a higher version with tiny modules that smartphone cameras struggle to resolve from a distance. If the destination URL is long, consider a short redirect.
  • Size for distance. A rough rule is a 10:1 ratio — a code meant to be scanned from 1 metre away should be roughly 10 cm wide. Billboards need much larger codes than a business card.
  • Always test the final medium. Scan the actual printout under realistic lighting, not just the screen preview. Ink bleed, glossy glare, and curved surfaces all reduce readability.

Common use cases

QR codes shine wherever you want to move someone from the physical world to a digital one without typing: restaurant menus, event check-ins, product packaging that links to instructions, Wi-Fi access for guests (encode WIFI:S:NetworkName;T:WPA;P:password;;), business cards that add a contact in one tap, and "pay by scan" systems. Because the data lives inside the code itself, a static QR code never expires and works offline — the scanner only needs the internet if the encoded link points somewhere online.

Static versus dynamic codes

The code this tool produces is static: the destination is baked into the pattern and cannot be changed after printing. That's ideal for permanent information and for privacy, since no third-party tracking service sits in the middle. Dynamic QR codes (offered by paid services) encode a short redirect URL so you can edit the destination or collect scan analytics later — useful for marketing, but it means a company logs every scan. For most personal and small-business needs, a static code is simpler, free, and more private.

常见问题

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}