Is it possible to create a QR code using text?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
QR codes I have seen are mostly image files. But can you create QR codes using plain text?
For example ASCII and UTF-8 have black boxes as characters. Can I use those together with spaces to create a QR code?
utf-8 ascii qr-code
New contributor
add a comment |
QR codes I have seen are mostly image files. But can you create QR codes using plain text?
For example ASCII and UTF-8 have black boxes as characters. Can I use those together with spaces to create a QR code?
utf-8 ascii qr-code
New contributor
7
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
5
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27
add a comment |
QR codes I have seen are mostly image files. But can you create QR codes using plain text?
For example ASCII and UTF-8 have black boxes as characters. Can I use those together with spaces to create a QR code?
utf-8 ascii qr-code
New contributor
QR codes I have seen are mostly image files. But can you create QR codes using plain text?
For example ASCII and UTF-8 have black boxes as characters. Can I use those together with spaces to create a QR code?
utf-8 ascii qr-code
utf-8 ascii qr-code
New contributor
New contributor
edited Apr 1 at 14:59
JakeGould
32.7k10100142
32.7k10100142
New contributor
asked Apr 1 at 14:32
Murat KaçiranMurat Kaçiran
7001410
7001410
New contributor
New contributor
7
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
5
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27
add a comment |
7
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
5
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27
7
7
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
5
5
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27
add a comment |
1 Answer
1
active
oldest
votes
Yes! There is a utility called qrencode
that can render these for you.
The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
qrencode -t ASCIIi 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Note: I used -t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.
ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
qrencode -t ANSI 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of 0x1b
and can often be written as e
.
e[40m
sets the background color to black
e[47m
sets the background color to white
0x20
is an ASCII space
UTF-8
There is also a UTF-8 mode (-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.
- ▀ - U+2580 / Upper Half Block
- ▄ - U+2584 / Lower Half Block
- █ - U+2588 / Full Block
Screenshot from @grawity (thanks)
qrencode -t UTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
qrencode -t ANSIUTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
3
Don't forget-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?
– grawity
Apr 1 at 15:00
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)
– grawity
Apr 1 at 15:04
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.
– grawity
Apr 2 at 11:46
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII#
one. +1.
– Digital Trauma
Apr 3 at 17:10
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
|
show 8 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Murat Kaçiran is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420001%2fis-it-possible-to-create-a-qr-code-using-text%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes! There is a utility called qrencode
that can render these for you.
The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
qrencode -t ASCIIi 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Note: I used -t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.
ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
qrencode -t ANSI 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of 0x1b
and can often be written as e
.
e[40m
sets the background color to black
e[47m
sets the background color to white
0x20
is an ASCII space
UTF-8
There is also a UTF-8 mode (-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.
- ▀ - U+2580 / Upper Half Block
- ▄ - U+2584 / Lower Half Block
- █ - U+2588 / Full Block
Screenshot from @grawity (thanks)
qrencode -t UTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
qrencode -t ANSIUTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
3
Don't forget-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?
– grawity
Apr 1 at 15:00
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)
– grawity
Apr 1 at 15:04
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.
– grawity
Apr 2 at 11:46
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII#
one. +1.
– Digital Trauma
Apr 3 at 17:10
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
|
show 8 more comments
Yes! There is a utility called qrencode
that can render these for you.
The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
qrencode -t ASCIIi 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Note: I used -t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.
ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
qrencode -t ANSI 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of 0x1b
and can often be written as e
.
e[40m
sets the background color to black
e[47m
sets the background color to white
0x20
is an ASCII space
UTF-8
There is also a UTF-8 mode (-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.
- ▀ - U+2580 / Upper Half Block
- ▄ - U+2584 / Lower Half Block
- █ - U+2588 / Full Block
Screenshot from @grawity (thanks)
qrencode -t UTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
qrencode -t ANSIUTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
3
Don't forget-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?
– grawity
Apr 1 at 15:00
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)
– grawity
Apr 1 at 15:04
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.
– grawity
Apr 2 at 11:46
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII#
one. +1.
– Digital Trauma
Apr 3 at 17:10
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
|
show 8 more comments
Yes! There is a utility called qrencode
that can render these for you.
The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
qrencode -t ASCIIi 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Note: I used -t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.
ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
qrencode -t ANSI 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of 0x1b
and can often be written as e
.
e[40m
sets the background color to black
e[47m
sets the background color to white
0x20
is an ASCII space
UTF-8
There is also a UTF-8 mode (-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.
- ▀ - U+2580 / Upper Half Block
- ▄ - U+2584 / Lower Half Block
- █ - U+2588 / Full Block
Screenshot from @grawity (thanks)
qrencode -t UTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
qrencode -t ANSIUTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Yes! There is a utility called qrencode
that can render these for you.
The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
qrencode -t ASCIIi 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Note: I used -t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.
ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
qrencode -t ANSI 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of 0x1b
and can often be written as e
.
e[40m
sets the background color to black
e[47m
sets the background color to white
0x20
is an ASCII space
UTF-8
There is also a UTF-8 mode (-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.
- ▀ - U+2580 / Upper Half Block
- ▄ - U+2584 / Lower Half Block
- █ - U+2588 / Full Block
Screenshot from @grawity (thanks)
qrencode -t UTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
qrencode -t ANSIUTF8 'https://superuser.com/questions/1420001/is-it-possible-to-write-a-qr-code'
edited Apr 2 at 10:42
answered Apr 1 at 14:54
AttieAttie
13.1k43548
13.1k43548
3
Don't forget-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?
– grawity
Apr 1 at 15:00
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)
– grawity
Apr 1 at 15:04
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.
– grawity
Apr 2 at 11:46
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII#
one. +1.
– Digital Trauma
Apr 3 at 17:10
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
|
show 8 more comments
3
Don't forget-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?
– grawity
Apr 1 at 15:00
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)
– grawity
Apr 1 at 15:04
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.
– grawity
Apr 2 at 11:46
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII#
one. +1.
– Digital Trauma
Apr 3 at 17:10
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
3
3
Don't forget
-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?– grawity
Apr 1 at 15:00
Don't forget
-t UTF-8
mode, which uses the "box drawings" characters that OP mentions?– grawity
Apr 1 at 15:00
9
9
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters
▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)– grawity
Apr 1 at 15:04
i.imgur.com/WQYkxYm.png i.imgur.com/KeDVJ16.png – this uses "half block" characters
▄
▀
█
, with optional colors to increase contrast only. (They're from Unicode 1.1 and date all the way to IBM DOS; surprised there's still any terminal that cannot render those...)– grawity
Apr 1 at 15:04
7
7
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,
qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.– grawity
Apr 2 at 11:46
@MuratKaçiran: Powershell and CMD are just command interpreters (shells), they both use the same "Windows Console" as the terminal. It too has received significant improvements in Win10.18xx. In the past, it did not support UTF-8 at all. It could do Unicode via UTF-16 with suitably written programs, but those programs had to deliberately use the special Unicode mode. If the program didn't do that, all you get is the MS-DOS era cp437 codepages... In that situation,
qrencode -t UTF8 | iconv -f utf8 -t cp437
may still work, as the same box drawings also existed back then.– grawity
Apr 2 at 11:46
6
6
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII
#
one. +1.– Digital Trauma
Apr 3 at 17:10
To my surprise, the QR reader app on my iphone successfully read all these off my screen, including the ASCII
#
one. +1.– Digital Trauma
Apr 3 at 17:10
3
3
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
@Attie: Oh, I probably had accidentally selected some text so it shows part of the line in reverse-text.
– grawity
Apr 4 at 10:30
|
show 8 more comments
Murat Kaçiran is a new contributor. Be nice, and check out our Code of Conduct.
Murat Kaçiran is a new contributor. Be nice, and check out our Code of Conduct.
Murat Kaçiran is a new contributor. Be nice, and check out our Code of Conduct.
Murat Kaçiran is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1420001%2fis-it-possible-to-create-a-qr-code-using-text%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
7
Is there a specific project this is for? I'm just curious
– Ben Leggiero
Apr 2 at 3:35
5
@BenLeggiero Thank you for your question. I don't have a certain project but I thought it would be handy to know the existence of such QR codes. For example, you can put those in a bio on a forum if the forum doesn't support profile pictures, and many more advantages.
– Murat Kaçiran
Apr 2 at 10:19
At a small enough font size, you don't even need the black boxes!
– Paul D. Waite
Apr 3 at 16:27