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;
}







108















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?










share|improve this question




















  • 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


















108















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?










share|improve this question




















  • 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














108












108








108


28






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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 1 at 14:59









JakeGould

32.8k10100142




32.8k10100142










asked Apr 1 at 14:32









Murat KaçiranMurat Kaçiran

7201410




7201410








  • 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





    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










1 Answer
1






active

oldest

votes


















165














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.



ASCII QR Code



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'


ANSI 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


ANSI QR Code Raw



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'


UTF-8 QR Code






share|improve this answer





















  • 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












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
});


}
});














draft saved

draft discarded


















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









165














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.



ASCII QR Code



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'


ANSI 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


ANSI QR Code Raw



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'


UTF-8 QR Code






share|improve this answer





















  • 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
















165














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.



ASCII QR Code



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'


ANSI 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


ANSI QR Code Raw



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'


UTF-8 QR Code






share|improve this answer





















  • 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














165












165








165







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.



ASCII QR Code



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'


ANSI 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


ANSI QR Code Raw



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'


UTF-8 QR Code






share|improve this answer















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.



ASCII QR Code



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'


ANSI 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


ANSI QR Code Raw



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'


UTF-8 QR Code







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 2 at 10:42

























answered Apr 1 at 14:54









AttieAttie

13.3k43649




13.3k43649








  • 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





    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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?