The text property of a text message that a LINE official account sends through the Messaging API can hold up to 5,000 characters, and the characters are counted in UTF-16 code units. This article uses Korean text as its example, so Korean example text is kept as written. One Korean syllable counts as 1, so Korean text alone fills the limit at 5,000 characters, but an apple emoji counts as 2 and a flag emoji as 4, so emojis reach the limit sooner than the number of visible characters suggests. The values below come from the public LINE Developers documentation, and the unit counts were calculated with the Geuljasu count functions.
How many characters can a LINE text message hold?
In the Messaging API reference of LINE Developers, the description of the text property of a text message ends with “Max character limit: 5000”. Text message (v2), which supports substituting mentions and emojis, has the same 5,000 limit. What happens past the limit shows in the error examples of the same reference: the examples for validating message objects contain the phrase “Length must be between 0 and 5000”, which confirms the rule of 0 to 5,000.
| Item | Limit in the official documentation |
|---|---|
| text of a text message | Up to 5,000 characters |
| LINE emojis in a text message | Up to 20 |
| Messages in one reply or push request | Up to 5 |
Because one request can carry 5 messages, five messages of 5,000 characters each would add up to 25,000 characters in theory. That number is a simple multiplication of the limits; we did not actually send that much. A text longer than 5,000 characters has to be split anyway, so the counting method below matters more.
These values apply when a bot sends through the API. The limit for text a person types into the LINE app was not confirmed in the official documentation this time, so do not apply these numbers to it.
How does LINE count characters?
The “Character counting in a text” page explains that the Messaging API counts characters in UTF-16 code units (16-bit). Characters made of several code units, such as some Kanji and Unicode emojis, count as more than one character, and the page gives the apple emoji as a two-character example. In other words, what a person sees as one character and what LINE counts can differ.
LINE’s own emojis need more care. The documentation says that when it counts a text containing a LINE emoji, the placeholder character $ is replaced with the emoji’s alternative text (the text shown instead on devices that cannot display it) before counting. It warns that the text may unintentionally exceed the limit and sending may fail, and that LINE does not disclose the alternative text. So a text that uses LINE emojis cannot be measured exactly with a calculation tool; the only option is to keep well below the limit.
How many characters does one emoji count as?
Counting how many UTF-16 code units one visible character takes with the Geuljasu functions gives the values below. The visible character count from the character counter is 1 for every item.
A Korean syllable is 1, so there is nothing to worry about. Characters that look just as single, such as the apple emoji and a rarely used extension Kanji, take 2; a thumbs-up with a skin tone and a flag take 4; a family emoji that joins three people takes 8. A heart depends on how it is written: the single character (U+2764) is 1, and adding the variation selector (U+FE0F) that makes it display as an emoji brings it to 2. Line breaks work the same way: a Windows-style line break (CRLF) is 1 visible character but 2 in UTF-16 units. How LINE actually counts CRLF was not tested this time, so that is the value you get by applying the rule as written.
How many of each fit in 5,000?
Dividing 5,000 by these unit counts shows where the limit is reached. Every value below was counted directly with the Geuljasu functions.
| Composition | Visible characters | UTF-16 units | Against 5,000 |
|---|---|---|---|
| 5,000 Korean characters | 5,000 | 5,000 | Equal to the limit (passes) |
| 5,001 Korean characters | 5,001 | 5,001 | Over |
| 2,500 apple emojis | 2,500 | 5,000 | Equal to the limit (passes) |
| 2,501 apple emojis | 2,501 | 5,002 | Over |
| 1,250 flag emojis | 1,250 | 5,000 | Equal to the limit (passes) |
| 625 family emojis | 625 | 5,000 | Equal to the limit (passes) |
| 4,000 Korean characters + 500 apple emojis | 4,500 | 5,000 | Equal to the limit (passes) |
| 4,000 Korean characters + 501 apple emojis | 4,501 | 5,002 | Over |
The last two rows are closest to real use. A text of Korean with emojis looks comfortable at 4,501 visible characters, but each emoji counts as 2, so it is 5,002 in UTF-16 units and exceeds the limit. For a long announcement that mixes in emojis, do not trust the number from a character counter alone; check the UTF-16 unit count too. The character counter on Geuljasu counts what a person sees, so when there are many emojis, stop well below the limit.
Do template messages count in a different unit?
According to the same page, some properties are counted in grapheme clusters, the characters a person sees, instead of UTF-16. These include the label of every action object, the text and title of the buttons, confirm and carousel templates, and the chatBarText and name of a rich menu. In those, an emoji counts as 1. The character limits of the templates confirmed in the reference are as follows.
The trap is that the same content is counted in different units as a text message and as a template. In a text message an emoji counts as 2 to 8, while in a template text it counts as 1, so comparing the two on the same basis is wrong.
How do you split a text longer than 5,000 characters?
To fit the limit in UTF-16 units without breaking characters, read the text one visible character at a time and accumulate the unit count. The code below works by the same rule that produced the values in the table above, and runs in a browser console. With 4,000 Korean characters and 501 apple emojis it splits into 5,000 and 2. It only cuts between characters and cannot know the length of a LINE emoji’s alternative text.
// LINE counts text in UTF-16 code units (the same as text.length)
const seg = new Intl.Segmenter('ko', { granularity: 'grapheme' });
const visible = (t) => [...seg.segment(t)].length;
const lineLength = (t) => t.length;
// Split within limit units without breaking a character (grapheme)
function splitForLine(text, limit = 5000) {
const parts = [];
let cur = '';
for (const { segment } of seg.segment(text)) {
if (cur.length + segment.length > limit) { parts.push(cur); cur = ''; }
cur += segment;
}
if (cur) parts.push(cur);
return parts;
}
const apple = '\u{1F34E}';
console.log(visible(apple), lineLength(apple)); // 1 2
const text = '가'.repeat(4000) + apple.repeat(501);
console.log(visible(text), lineLength(text)); // 4501 5002
console.log(splitForLine(text).map((p) => p.length)); // [ 5000, 2 ]
When the split text becomes several messages, remember that one request can carry up to 5. For a long text over 5,000 characters, fit text to a limit shows in advance how far the beginning fits, and if you need a byte basis, the byte counter shows the UTF-8 value.
Frequently asked questions
Can 5,000 Korean characters be sent in one LINE message?
The text limit is 5,000 characters and a Korean syllable counts as 1 UTF-16 code unit, so a text made only of Korean fits up to 5,000 characters in one message. From 5,001 characters it is over the limit. When emojis or line breaks are mixed in, the unit count becomes larger than the visible character count, so leave some margin.
Why do emojis reduce the character count?
Because LINE counts characters in UTF-16 code units. As in the official example, an apple emoji is two code units and counts as 2 characters. A thumbs-up with a skin tone, a flag or a family emoji can reach 4 to 8 units, so the more emojis you use, the fewer visible characters you can send.
Is text typed directly in the LINE app also limited to 5,000 characters?
The 5,000 characters in this article is the value written for the text message in the Messaging API. The limit for text a person types in the app was not confirmed in the official documentation this time. Paste your text into the app to check, and look at the count first with the character counter before sending.