<p>Just stumbled upon the answer to this on Twitter myself: <a href="https://twitter.com/sakak_musdom/status/1084857547947880448" rel="nofollow noreferrer">https://twitter.com/sakak_musdom/status/1084857547947880448</a></p>

<p>So the 128x64 pixel OLED display (0.96 inch) is apparently enough to display a lightning invoice.</p>

CC BY-SA 4.0
2019-02-10T14:42:25.903Z
2019-02-10T14:42:25.903Z
Jon Doe
<p>First of all yes it is possible to convert all characters to uppercase a trick some users of lightning already use. </p>

<p>If you look <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md" rel="nofollow noreferrer">in the lightning rfc</a> you can see that the length of an invoice can become quite large as the discriptions, routing hints and fallback addresses are not fixed I think there is not even an upper limit defined. For example this test invoice has 439 characters.</p>

<blockquote>
  <p>lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqhp58yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqsfpp3qjmp7lwpagxun9pygexvgpjdc4jdj85fr9yq20q82gphp2nflc7jtzrcazrra7wwgzxqc8u7754cdlpfrmccae92qgzqvzq2ps8pqqqqqqpqqqqq9qqqvpeuqafqxu92d8lr6fvg0r5gv0heeeqgcrqlnm6jhphu9y00rrhy4grqszsvpcgpy9qqqqqqgqqqqq7qqzqj9n4evl6mr5aj9f58zp6fyjzup6ywn3x6sk8akg5v4tgn2q8g4fhx05wf6juaxu9760yp46454gpg5mtzgerlzezqcqvjnhjh8z3g2qqdhhwkj</p>
</blockquote>

<p>QR Codes themselves come at <a href="https://www.qrcode.com/en/about/version.html" rel="nofollow noreferrer">different versions</a> which define how much data can be stored in them depending on how many pixels are used. </p>

<p>What I can't tell u if one pixel of a display would be sufficient. I guess even with error correction this would not be enough. For example the <a href="https://github.com/rootzoll/raspiblitz" rel="nofollow noreferrer">RaspiBlitz uses a 320 * 480 display</a> </p>

CC BY-SA 4.0
2019-01-06T19:48:15.650Z
2019-01-06T19:48:15.650Z
Rene Pickhardt
<p>what would be the minimum screen size to display lightning invoices as a qr-code?</p>

<p>For the Raspberry Pi Zero I found these displays:</p>

<ul>
<li>128x128 pixel LCD display (1.44 inch)</li>
<li>200x200 pixel e-paper/e-Ink display (1.54 inch)</li>
<li>128x64 pixel OLED display (0.96 inch)</li>
</ul>

<p>I saw the examples in BOLT#11 and know that it depends on the input type and error correction setting when creating the qr-code.</p>

<p>Would the qr-code be readable if every black dot of the qr-code would be respresented with only one dot? Or do I need for example 4 dots, resulting in a 32x32 qr-code? Would that be enough for lightning invoices? Is it possible to convert the lightning invoice in all uppercase for generating the qr-code in alphanumeric mode which only uses 5.5 bits per character instead of 8?</p>

<p>With the Google Charts API it is possible to generate QR-Codes, this link generates a QR-Code with 128x128 pixel with the first example invoice from BOLT#11 and an error correction of M (allows recovery of up to 15% data loss): <a href="https://chart.googleapis.com/chart?cht=qr&amp;chl=lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w&amp;chs=128x128&amp;chld=M|0" rel="nofollow noreferrer">https://chart.googleapis.com/chart?cht=qr&amp;chl=lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w&amp;chs=128x128&amp;chld=M|0</a></p>

<qrcode>
Lightning Invoice QR-Code minimum size/display resolution?
Jon Doe
# Lightning Invoice QR-Code minimum size/display resolution?

(Asked by: username_0 on 2019-01-06)

what would be the minimum screen size to display lightning invoices as a qr-code?

For the Raspberry Pi Zero I found these displays:

* 128x128 pixel LCD display (1.44 inch)
* 200x200 pixel e-paper/e-Ink display (1.54 inch)
* 128x64 pixel OLED display (0.96 inch)

I saw the examples in BOLT#11 and know that it depends on the input type and error correction setting when creating the qr-code.

Would the qr-code be readable if every black dot of the qr-code would be respresented with only one dot? Or do I need for example 4 dots, resulting in a 32x32 qr-code? Would that be enough for lightning invoices? Is it possible to convert the lightning invoice in all uppercase for generating the qr-code in alphanumeric mode which only uses 5.5 bits per character instead of 8?

With the Google Charts API it is possible to generate QR-Codes, this link generates a QR-Code with 128x128 pixel with the first example invoice from BOLT#11 and an error correction of M (allows recovery of up to 15% data loss): <https://chart.googleapis.com/chart?cht=qr&chl=lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w&chs=128x128&chld=M|0>

**Tags:** qrcode


---

## 2 answers

### Answer by username_0 on 2019-02-10. Score: 0 | Accepted answer

Just stumbled upon the answer to this on Twitter myself: <https://twitter.com/sakak_musdom/status/1084857547947880448>

So the 128x64 pixel OLED display (0.96 inch) is apparently enough to display a lightning invoice.


---

### Answer by username_1 on 2019-01-06. Score: 0

First of all yes it is possible to convert all characters to uppercase a trick some users of lightning already use.

If you look [in the lightning rfc](https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md) you can see that the length of an invoice can become quite large as the discriptions, routing hints and fallback addresses are not fixed I think there is not even an upper limit defined. For example this test invoice has 439 characters.

> lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqhp58yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqsfpp3qjmp7lwpagxun9pygexvgpjdc4jdj85fr9yq20q82gphp2nflc7jtzrcazrra7wwgzxqc8u7754cdlpfrmccae92qgzqvzq2ps8pqqqqqqpqqqqq9qqqvpeuqafqxu92d8lr6fvg0r5gv0heeeqgcrqlnm6jhphu9y00rrhy4grqszsvpcgpy9qqqqqqgqqqqq7qqzqj9n4evl6mr5aj9f58zp6fyjzup6ywn3x6sk8akg5v4tgn2q8g4fhx05wf6juaxu9760yp46454gpg5mtzgerlzezqcqvjnhjh8z3g2qqdhhwkj

QR Codes themselves come at [different versions](https://www.qrcode.com/en/about/version.html) which define how much data can be stored in them depending on how many pixels are used.

What I can't tell u if one pixel of a display would be sufficient. I guess even with error correction this would not be enough. For example the [RaspiBlitz uses a 320 \* 480 display](https://github.com/rootzoll/raspiblitz)


---

