<p><strong>The memo field can hold 639 bytes of information.</strong></p>

<p>But how many characters? Let's assume utf8 (since lncli encodes the text in utf8)</p>

<p>utf8's characters are variable length, meaning some are larger than others. </p>

<p>From <a href="https://stackoverflow.com/a/10229225/5838056">stackoverflow:</a></p>

<blockquote>
  <p>The first 128 characters (US-ASCII) need one byte.</p>
  
  <p>The next 1,920 characters need two bytes to encode. This covers the
  remainder of almost all Latin alphabets, and also Greek, Cyrillic,
  Coptic, Armenian, Hebrew, Arabic, Syriac and Tāna alphabets, as well
  as Combining Diacritical Marks.</p>
  
  <p>Three bytes are needed for characters in the rest of the Basic
  Multilingual Plane, which contains virtually all characters in common
  use[12] including most Chinese, Japanese and Korean [CJK] characters.</p>
  
  <p>Four bytes are needed for characters in the other planes of Unicode,
  which include less common CJK characters, various historic scripts,
  mathematical symbols, and emoji (pictographic symbols).</p>
</blockquote>

<p>For the <a href="http://www.columbia.edu/kermit/ascii.html" rel="nofollow noreferrer">US-ASCII character set</a> and onward:</p>

<p>639 bytes / (1 byte / 1 char) = 639 characters</p>

<p>639 bytes / (2 byte / 1 char) = 319 characters</p>

<p>639 bytes / (3 byte / 1 char) = 213 characters</p>

<p>639 bytes / (4 byte / 1 char) = 159 characters</p>

CC BY-SA 4.0
2019-04-09T19:35:11.697Z
2019-04-09T19:35:11.697Z
arshbot
<p>What is the maximum size of text held in the memo portion of a lightning network payment request? </p>

<lightning-network><lncli><invoices>
What's the maximum size of the memo in a LN payment request?
arshbot
# What's the maximum size of the memo in a LN payment request?

(Asked by: username_0 on 2019-04-09)

What is the maximum size of text held in the memo portion of a lightning network payment request?

**Tags:** lightning-network, lncli, invoices


---

## 1 answers

### Answer by username_0 on 2019-04-09. Score: 2 | Accepted answer

**The memo field can hold 639 bytes of information.**

But how many characters? Let's assume utf8 (since lncli encodes the text in utf8)

utf8's characters are variable length, meaning some are larger than others.

From [stackoverflow:](https://stackoverflow.com/a/10229225/5838056)

> The first 128 characters (US-ASCII) need one byte.
>
> The next 1,920 characters need two bytes to encode. This covers the
> remainder of almost all Latin alphabets, and also Greek, Cyrillic,
> Coptic, Armenian, Hebrew, Arabic, Syriac and Tāna alphabets, as well
> as Combining Diacritical Marks.
>
> Three bytes are needed for characters in the rest of the Basic
> Multilingual Plane, which contains virtually all characters in common
> use[12] including most Chinese, Japanese and Korean [CJK] characters.
>
> Four bytes are needed for characters in the other planes of Unicode,
> which include less common CJK characters, various historic scripts,
> mathematical symbols, and emoji (pictographic symbols).

For the [US-ASCII character set](http://www.columbia.edu/kermit/ascii.html) and onward:

639 bytes / (1 byte / 1 char) = 639 characters

639 bytes / (2 byte / 1 char) = 319 characters

639 bytes / (3 byte / 1 char) = 213 characters

639 bytes / (4 byte / 1 char) = 159 characters


---

