Character Counter
Count characters with and without spaces in your text. Essential for social media posts, SMS messages, meta descriptions, and any content with character limits.
Character Limits by Platform
| Platform | Character Limit |
|---|---|
| Twitter/X | 280 characters |
| Instagram caption | 2,200 characters |
| Facebook post | 63,206 characters |
| LinkedIn post | 3,000 characters |
| YouTube title | 100 characters |
| Meta description | 155-160 characters |
| SMS message | 160 characters |
Character Counting Methods
| Method | Includes |
|---|---|
| With spaces | All characters including whitespace |
| Without spaces | Only letters, numbers, punctuation |
| Letters only | Alphabetic characters only |
| Alphanumeric | Letters and numbers only |
Character Counter Implementation
``javascript
function countCharacters(text) {
return {
total: text.length,
withoutSpaces: text.replace(/\s/g, '').length,
letters: (text.match(/[a-zA-Z]/g) || []).length,
numbers: (text.match(/[0-9]/g) || []).length,
punctuation: (text.match(/[^\w\s]/g) || []).length,
spaces: (text.match(/\s/g) || []).length
};
}
``
Unicode and Special Characters
Unicode characters like emojis may count as multiple characters in some systems. Twitter counts most emojis as 2 characters. Our tool shows both standard and Unicode-aware counts.