Text Length Limits: Platform Character Restrictions Explained

May 28, 2026

Why Text Limits Exist

Platforms enforce character limits for practical reasons. Social media feeds need to show multiple posts per screen. Search results need consistent snippet sizes. Databases need predictable storage. APIs need bounded payloads.

For you, the writer or developer, these limits are hard constraints. Exceed them and your content gets silently truncated, your form rejects the submission, or your API call fails. Knowing the exact numbers saves time and prevents frustration.

Social Media Character Limits

Social platforms define limits per field, not per account. Here is the complete breakdown:

PlatformFieldCharacter Limit
X (Twitter)Tweet280
X (Twitter)Display name50
X (Twitter)Bio160
InstagramCaption2,200
InstagramBio150
InstagramHashtag30 tags max
LinkedInPost3,000
LinkedInArticle120,000
LinkedInHeadline220
LinkedInAbout section2,600
FacebookPost63,206
FacebookAd primary text125
FacebookAd headline40
TikTokCaption2,200
TikTokBio80
YouTubeTitle100
YouTubeDescription5,000
PinterestPin description500
PinterestBoard name100
RedditPost title300
RedditPost body40,000
SnapchatCaption250

Practical Tips for Social Limits

  • Always write under the limit. If a tweet allows 280 characters, aim for 240. Truncation markers ("...") signal rushed writing.
  • Account for links. X (Twitter) reserves 23 characters for any URL, regardless of its actual length. Always test with the final shortened URL.
  • Emojis cost more bytes. Adding 10 emojis to an Instagram caption does not change the character count much, but it increases byte size substantially. Some analytics tools still count bytes.
  • Whitespace counts. Line breaks and spaces count toward limits. A 2,200-character Instagram caption with generous spacing might hit the wall sooner than you expect.

SEO Character Limits

Search engines do not publish hard limits, but they truncate display at predictable points:

FieldRecommended LimitWhat Happens If You Exceed It
Title tag60 charactersGoogle truncates with "..."
Meta description155 charactersGoogle truncates with "..."
URL slug75 charactersBrowsers handle longer URLs, but search results may crop the display
URL total2,048 charactersInternet Explorer refuses to load longer URLs; other browsers vary
H1 heading70 charactersNo truncation penalty, but overly long headings dilute keyword focus
Alt text125 charactersScreen readers process longer alt text, but conciseness improves accessibility

Title Tag Strategy

Search engines weigh the first words in a title tag more heavily. Put your primary keyword near the beginning. If your title is "Best Project Management Tools for Small Teams in 2026," Google reads and ranks "Best Project Management Tools" more than the trailing context.

A practical formula for title tags:

[Primary Keyword] - [Differentiator] | [Brand]

Example: "Character Counter - Free Online Tool | ToolBoxes"

Meta Description Strategy

Meta descriptions do not directly affect rankings, but they strongly influence click-through rates. A compelling description under 155 characters can dramatically improve traffic from the same ranking position.

Write descriptions as ad copy, not summaries. Include a benefit and a verb.

Database and API Character Limits

Backend systems enforce limits that front-end validation must match. Mismatches cause silent truncation or server errors.

Common Database Limits

DatabaseTypeCharacter Limit
MySQLVARCHARUp to 65,535 bytes (shared row limit)
MySQLTEXT65,535 bytes
MySQLMEDIUMTEXT16,777,215 bytes
PostgreSQLVARCHAR(n)User-defined (up to ~1 GB)
PostgreSQLTEXTUnlimited (up to ~1 GB)
SQLiteTEXT1 billion bytes
MongoDBString16 MB per document

The critical detail: MySQL's VARCHAR counts bytes, not characters, when using multi-byte encodings. A VARCHAR(100) column with utf8mb4 can store 100 ASCII characters but only 25 four-byte emojis.

API Payload Limits

APILimit
REST API (typical)1–10 MB request body
GraphQLVaries by implementation
AWS API Gateway10 MB
Cloudflare Workers100 MB
Stripe API500 KB per request
Twitter API v2280 characters per tweet field

Always validate input length on both client and server. Client-side validation improves UX with immediate feedback. Server-side validation prevents malicious or malformed requests from reaching your database.

Handling Character Limits in Code

Here are practical patterns for enforcing limits correctly across languages.

JavaScript: Count Unicode Characters Correctly

// Wrong: counts UTF-16 code units
text.length

// Right: counts Unicode characters
[...text].length

Python: Count Characters vs Bytes

len("😀")  # 1 — Python counts characters correctly
len("😀".encode("utf-8"))  # 4 — byte count for storage

Trim Text Without Breaking Words

Truncating at an exact character limit often cuts mid-word. A better approach truncates at the last space before the limit.

function truncate(text, maxChars) {
  if ([...text].length <= maxChars) return text
  const truncated = text.slice(0, maxChars)
  const lastSpace = truncated.lastIndexOf(' ')
  return truncated.slice(0, lastSpace) + '...'
}

Validate Input Length on Form Submission

Always enforce limits before sending data to the server:

<input maxlength="280" />
<p id="counter">0 / 280</p>
const input = document.querySelector('input')
const counter = document.querySelector('#counter')
input.addEventListener('input', () => {
  const count = [...input.value].length
  counter.textContent = `${count} / 280`
})

Pair maxlength with a live counter so users see their remaining allowance before they hit the wall.

Key Takeaways

  • Social media platforms enforce strict character limits per field — always write under the limit to avoid truncation markers.
  • SEO title tags should stay under 60 characters and meta descriptions under 155 characters to prevent Google from cropping your display.
  • MySQL VARCHAR counts bytes, not characters — multi-byte characters eat into your limit faster than you might expect.
  • JavaScript .length counts UTF-16 code units, not Unicode characters — use the spread operator for accurate counts.
  • Validate character limits on both client and server. Client-side gives instant feedback; server-side prevents database corruption.
  • Trim text at word boundaries rather than at exact character positions for cleaner results.

Try It Yourself

Before you publish your next post, send that email, or commit your code — verify your character count. Our free tool counts characters, words, and bytes in real time so nothing gets cut off.

Free Character Counter Tool