Characters
Total
0
No spaces
0
Letters only
0
Digits
0
Spaces
0
Structure
Words
0
Sentences
0
Paragraphs
0
Lines
0
Byte Size
UTF-8
0 B
UTF-16
0 B
ASCII
0 B
How to Use This Tool
Step 1
Enter your text
Type directly into the editor or use the Paste button to paste from your clipboard. Click Sample to load example text with special characters.
Step 2
Read instant results
Character counts, word counts, byte sizes, and more update live as you type. No button press needed — everything is reactive.
Step 3
Check platform limits
Visual progress bars show how your text measures against Twitter/X, SMS, meta tags, database fields, and other common limits.
Step 4
Review encoded sizes
See how your string grows when URL-encoded, Base64-encoded, or converted to HTML entities — critical for API payloads and storage planning.
Character Limits
Encoded Lengths
Character Limit Reference Guide
A comprehensive reference of character and byte limits across social media platforms, messaging protocols, web standards, databases, and programming languages. Bookmark this page as a quick-lookup resource.
| Platform / Context | Field | Limit | Notes |
|---|---|---|---|
| Social Media | |||
| X / Twitter | Post | 280 | URLs count as 23 chars; Premium may allow more |
| Caption | 2,200 | Only first ~125 chars show before "more" | |
| Bio | 150 | ||
| Post | 3,000 | First ~140 chars visible in feed | |
| Article headline | 100 | ||
| YouTube | Video title | 100 | Only ~70 chars display in search results |
| YouTube | Description | 5,000 | First ~120 chars visible before expand |
| TikTok | Caption | 4,000 | Was 150, expanded in 2023 |
| Post title | 300 | ||
| Pin description | 500 | First 50-60 chars most visible | |
| Messaging | |||
| SMS (GSM-7) | Single segment | 160 | Multi-part: 153 chars/segment |
| SMS (Unicode) | Single segment | 70 | Multi-part: 67 chars/segment |
| Slack | Message | 40,000 | |
| Discord | Message | 2,000 | Nitro: 4,000 |
| Message | 65,536 | ||
| iMessage | Message | 20,000 | Approximate; falls back to SMS at 160 |
| SEO & Web | |||
| Meta title | Title tag | 60 | Google typically displays 50-60 chars |
| Meta description | Description tag | 155 | Google may show up to ~160 on desktop |
| URL slug | Best practice | 75 | Technically up to 2,048 chars; keep short |
| Alt text | Image alt | 125 | Recommended max; screen readers may truncate |
| Push notification | Body | 178 | Varies by OS; iOS ~178, Android ~240 |
| Email subject | Subject line | 78 | RFC 2822; mobile shows ~30-40 chars |
| Databases | |||
| MySQL | VARCHAR max | 65,535 | Bytes, not chars; row limit applies |
| PostgreSQL | VARCHAR max | 10,485,760 | ~10MB; TEXT type is unlimited |
| SQL Server | VARCHAR max | 8,000 | VARCHAR(MAX) allows ~2GB |
| SQLite | TEXT max | 1,000,000,000 | 1 billion bytes default |
| Common default | VARCHAR(255) | 255 | 1-byte length prefix; historical convention |
| APIs & Protocols | |||
| URL (practical) | Full URL | 2,048 | IE legacy limit; modern browsers allow more |
| HTTP header | Single header | 8,192 | Common server default (Apache/Nginx) |
| JSON key | Best practice | 256 | No spec limit; practical convention |
| JWT token | Practical max | 8,000 | Must fit in HTTP header |
Frequently Asked Questions
What is the difference between character count and byte size?
Character count is the number of individual characters in your string, regardless of how they're stored. Byte size depends on the encoding: ASCII uses 1 byte per character but only supports 128 characters. UTF-8 uses 1 to 4 bytes depending on the character — standard English letters are 1 byte, accented characters like
é are 2 bytes, CJK characters are 3 bytes, and emoji are 4 bytes. UTF-16 uses 2 bytes for most characters and 4 bytes for supplementary characters. This distinction matters when working with database column sizes, API payload limits, and file sizes.
Why does my string length differ between JavaScript and Python?
JavaScript's
.length property counts UTF-16 code units, not Unicode code points. Emoji and some special characters use two code units (called a surrogate pair), so JavaScript reports a length of 2 for a single emoji like 🚀. Python 3's len() counts Unicode code points, giving 1 for the same emoji. To get the code point count in JavaScript, use [...str].length with the spread operator. This tool shows the JavaScript .length value by default since it runs in the browser.
What is the character limit for tweets on X / Twitter?
Standard X / Twitter accounts have a 280-character limit per post. URLs are automatically shortened and counted as a fixed length (currently 23 characters) regardless of the actual URL length. Premium subscribers may have higher character limits. The limit is measured in Unicode code points using Twitter's own counting library, which handles some edge cases differently than a simple
.length check.
How many characters fit in a single SMS message?
A single SMS segment holds 160 characters when using GSM-7 encoding, which covers standard Latin characters, digits, and common punctuation. If your message includes any Unicode characters — emoji, CJK characters, or characters outside the GSM-7 set — the entire message switches to UCS-2 encoding and the limit drops to 70 characters per segment. Longer messages are automatically split into multiple segments (153 characters each for GSM-7, or 67 for UCS-2, due to header overhead).
Is my text data sent to a server?
No. All text analysis happens entirely in your browser using JavaScript. Your text never leaves your device — nothing is transmitted, stored, or logged. You can verify this by opening your browser's network inspector (F12 → Network tab) while using the tool. The page works fully offline after the initial load.
What is a VARCHAR(255) and why is 255 a common limit?
VARCHAR(255) is a variable-length character column type in SQL databases. The number 255 is a common default because it's the maximum length that can be described with a single byte (2⁸ - 1 = 255), which historically allowed the database to store the string length prefix in just 1 byte. Going above 255 requires a 2-byte length prefix. In modern databases this overhead is minimal, but 255 remains a widely-used convention for fields like names, email addresses, and short descriptions.