A bot that posts alerts or announcements to Slack is told to keep the text property of a message within 4,000 characters, and a message over 40,000 characters is posted with its tail cut off. When you use blocks, the limit is not set for the whole message but separately for each block type: section text holds up to 3,000 characters and a header up to 150. This article uses Korean text as its counting example, so the Korean sample text is kept as written. The values come from the public Slack Developer Docs, and the Korean character counts and bytes were calculated with the Geuljasu count functions.
AI-generated image
How many characters can the text of a Slack message hold?
The chat.postMessage documentation gives two numbers for the text property. One is a recommendation: for best results, keep text within 4,000 characters. The other is the hard limit: a message with more than 40,000 characters is truncated. The documentation also explains that text longer than 4,000 characters may be split into several messages of about 4,000 characters each, and it describes 40,000 characters as about 10 such messages.
Going past 40,000 does not make the request fail. The message is posted truncated, and the response carries a message_truncated warning inside the warnings of response_metadata. The Slack changelog records that this rule began on August 12, 2018. So a message near 40,000 characters may not be posted whole, and you have to look for the warning in the response to know.
| Item | Value in the official documentation |
|---|---|
| Recommended length of message text | Within 4,000 characters |
| Text longer than 4,000 characters | May be split into messages of about 4,000 characters |
| Hard limit of message text | 40,000 characters (cut off past it, with a warning) |
The unit in which characters are counted does not appear in the part of the documentation we checked. So we do not claim how emojis or line breaks are counted against the limit. If you keep the count from character count comfortably below 4,000, you are on the safe side whatever the unit is.
How do the limits change when you use blocks?
The same documentation states that when you use blocks, the character limit and truncation are determined by the specific block type, not by the message as a whole. These are the per-block values we confirmed in the official documentation.
The text of a section block (Section block) runs from 1 to 3,000 characters. The fields array of the same block takes up to 10 items, each with text of up to 2,000 characters. The text of a header block (Header block) is limited to 150 characters, the shortest of these. A context block (Context block) is limited not by characters but by its number of elements, at most 10.
So the same alert has a limit of 4,000 when sent as plain text and 3,000 when sent in a section block. If you paste a long error log whole into an alert built with blocks, it can pass the text rule and still hit the 3,000 limit of the section.
How many characters and bytes is Korean text?
Counting a text made only of Korean syllables with the Geuljasu functions, 3,000 characters are 9,000 bytes in UTF-8, 4,000 characters are 12,000 bytes, and 40,000 characters are 120,000 bytes. 3,001 characters are 9,003 bytes, so each added character adds 3 bytes. The Slack documentation states the limits in characters, so you should fit characters rather than bytes; the byte values are only for comparing with other measures such as the size of a server log. A text made of 2,990 Korean characters followed by 5 line breaks and 5 English letters counts as 3,000 characters and 8,980 bytes in UTF-8. Geuljasu counts a line break as one character, but we could not confirm that Slack counts line breaks the same way, so do not leave the text right at the limit.
| Text made only of Korean syllables | Characters | UTF-8 bytes | Rule it meets |
|---|---|---|---|
| 3,000 characters | 3,000 | 9,000 | Equal to the section block text limit |
| 3,001 characters | 3,001 | 9,003 | Over the section block limit |
| 4,000 characters | 4,000 | 12,000 | Equal to the recommended text length |
| 40,000 characters | 40,000 | 120,000 | Equal to the text hard limit |
How do you split a long text before sending?
For a text over 4,000 characters it is easier to predict the result if you split it yourself than if you leave the splitting to Slack. A 40,000-character text split into 4,000-character pieces makes 10 messages, and a 10,000-character text makes 3. Cut at paragraph or line boundaries so that no sentence is divided in the middle. The code below piles up lines and cuts just before the limit would be passed. If one line is longer than the limit, it cuts that line by character count and continues.
// Split on line boundaries so each piece stays within limit characters
function splitForSlack(text, limit = 4000) {
const parts = [];
let cur = '';
for (const line of text.split('\n')) {
const piece = line + '\n';
if (cur.length + piece.length > limit && cur) { parts.push(cur); cur = ''; }
let rest = piece;
while (rest.length > limit) { parts.push(rest.slice(0, limit)); rest = rest.slice(limit); }
cur += rest;
}
if (cur) parts.push(cur);
return parts;
}
// '가' is one Korean syllable (ga)
console.log(splitForSlack('가'.repeat(10000)).map((p) => p.length)); // [ 4000, 4000, 2001 ]
The last piece is 2,001 because one line-break character is added at the end. To preview how far the start of a text fits, use cut to a length, and to estimate size in bytes use the byte calculator.
Frequently asked questions
Is the Slack message limit 4,000 or 40,000 characters?
Both values appear in the official documentation, but they mean different things. 4,000 characters is the recommended length for best results, and 40,000 is the hard limit past which the message is cut off. Past 4,000 the text may be split into messages of about 4,000 characters, so keep it within 4,000 if you want it to show as one message.
Does sending more than 40,000 characters make the request fail?
No, the message is posted truncated. The official documentation and changelog say the response then carries a message_truncated warning. If you do not check the warnings of the response, you may not notice that the text was cut.
Can I use 4,000 characters when I send blocks?
With blocks, the limit of each block type applies instead of one for the whole message. Section block text holds up to 3,000 characters and header block text up to 150, so 4,000 characters cannot go in as they are. Split a long body across several section blocks or send it as text, and check the length with character count before sending.