ASCII 二维码生成器:用文本表示的二维码
把链接或文本变成由字符组成的二维码,用于终端、代码和聊天。Unicode 方块或纯 ASCII,附可直接复制的代码片段。
工具本身的按钮和标签目前仍为英文。
Two rows per line with █ ▀ ▄. The most compact, and square in a terminal.
Pick the background the characters will sit on. Most terminals are light text on a dark background, so choose dark: the output is inverted so the squares still come out dark and the margin light, which is what scanners look for. Choose light for documents, light-theme terminals and paper.
Lower error correction means fewer characters. Text on a screen does not get scratched, so L or M is usually right.
Preview · scan it from this screen
█████████████████████████████████ █████████████████████████████████ ████ ▄▄▄▄▄ ████▄ ▀▀ █ ▄▄▄▄▄ ████ ████ █ █ █ █▀█▄▀ ▀██ █ █ ████ ████ █▄▄▄█ █ █▄▀▄▀▀▄█ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█ █ ▀▄█ █ █▄▄▄▄▄▄▄████ ████ █▄▄ ▄█▀ ▀▄ ███▀▄ ▄▄▄▀█████ ████▄▀▄███▄▀▀▀█ █▄ █▀ █▄█▄ ████ ████▀▄█▀ ▄▄▀▄█▄▄▄ ▄▄▀▄▄▀▄▀▄ ▄████ ████ █▄█▄▄▄ ▄██ ▄██ ▀▀ ▄█▄ ████ ████▄█▄▄▄▄▄█▀██▄ ▄▄▀ ▄▄▄ ▀▄██████ ████ ▄▄▄▄▄ █▀▄ ▀██ █ █▄█ ▀▄ ████ ████ █ █ █ █ ▄ ▄ ▄ ▄ ▀ ▀▀████ ████ █▄▄▄█ █▄ █▄█▄▄▀▀█▀▀ ▄█ ████ ████▄▄▄▄▄▄▄█▄██▄▄▄▄██▄▄▄▄▄▄▄▄████ █████████████████████████████████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
33 × 17 characters · 25 × 25 modules · version 2. Proportional fonts and extra line spacing break it: the rows must touch and every character must be the same width.
Paste into a terminal, a code comment or a chat code block. It needs a monospace font with no extra line spacing.
█████████████████████████████████ █████████████████████████████████ ████ ▄▄▄▄▄ ████▄ ▀▀ █ ▄▄▄▄▄ ████ ████ █ █ █ █▀█▄▀ ▀██ █ █ ████ ████ █▄▄▄█ █ █▄▀▄▀▀▄█ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█ █ ▀▄█ █ █▄▄▄▄▄▄▄████ ████ █▄▄ ▄█▀ ▀▄ ███▀▄ ▄▄▄▀█████ ████▄▀▄███▄▀▀▀█ █▄ █▀ █▄█▄ ████ ████▀▄█▀ ▄▄▀▄█▄▄▄ ▄▄▀▄▄▀▄▀▄ ▄████ ████ █▄█▄▄▄ ▄██ ▄██ ▀▀ ▄█▄ ████ ████▄█▄▄▄▄▄█▀██▄ ▄▄▀ ▄▄▄ ▀▄██████ ████ ▄▄▄▄▄ █▀▄ ▀██ █ █▄█ ▀▄ ████ ████ █ █ █ █ ▄ ▄ ▄ ▄ ▀ ▀▀████ ████ █▄▄▄█ █▄ █▄█▄▄▀▀█▀▀ ▄█ ████ ████▄▄▄▄▄▄▄█▄██▄▄▄▄██▄▄▄▄▄▄▄▄████ █████████████████████████████████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Want scan counts and an editable destination? Make it a free dynamic code. Want it in your own image? Make a picture code.
输入文本或链接。二维码会随着你的输入用字符绘制出来。
选择半块、全块或纯 ASCII,以及它将显示在什么背景上:大多数终端是深色。
复制成纯文本、Markdown、shell 的 printf 行或 HTML 的 <pre>,并在它实际所在的位置扫一次确认。
常见问题
为什么我的文本二维码扫不出来?+
各行必须紧挨着,每个字符的宽度也必须一致。比例字体、额外的行距或自动换行,都会把方块拉开。缺少边距,或者背景设置错误导致二维码变成反色,也会失败。由 # 组成的纯 ASCII 二维码几乎扫不出来:能用方块就用方块。
应该选哪种背景?+
选字符将要显示的那种背景。大多数终端是深色背景配浅色文字,所以选“深色”:输出会被反相,方块仍是深色、边距是浅色。文档、浅色主题终端和纸张则选“浅色”。
什么是半块?+
填充文本单元格上半部分、下半部分或整个单元格的字符(▀ ▄ █)。每个字符承载二维码的两行,所以行数减半;又因为终端单元格的高度约是宽度的两倍,方块正好是正方形。
在 GitHub 的 README 里能扫出来吗?+
可以显示,但 GitHub 和大多数 Markdown 渲染器会给代码块增加行距,行与行之间的空隙往往就足以让手机读不出来。README 里请用二维码的 SVG 图片,文本版本留给终端和纯文本文件。
它有多大?会上传什么吗?+
短链接用半块大约需要 33 列,完全放得进 80 列的终端;全块和 ASCII 需要两倍宽度。二维码在你的浏览器里生成,不会向任何地方发送内容。
更多免费工具
下一步
让二维码本身成为作品。
这些工具用来制作和检测常规二维码。AriaQR 则能把你的照片、Logo 或插画直接变成二维码本身,下载前已在真实解码器上验证,还支持修改链接和统计扫码数据。
