CountText

Free word, character and text counter

Home › Guides › X (Twitter) weighted character rules

X weighted character rules: inside twitter-text v3, Unicode ranges and t.co

By CountText · Last reviewed November 21, 2026

Want to check a post right now? Use the live X character limit checker. This technical reference explains how X’s open-source twitter-text v3 specification actually computes weighted length—Unicode block ranges, emoji grapheme collapsing, NFC normalization, and 23-character t.co URLs.

This page walks through the official rules, then shows worked examples. We checked X’s own Counting Characters documentation and the open-source twitter-text configuration on 11 November 2026, and we ran the official library on the example strings below so the numbers are reproducible.

The cap is 280 weighted characters

X’s documentation says: “Posts on X can contain up to 280 characters. However, not all characters count equally.” [1] The official table of weights is:

X character weights, from the official Counting Characters page
Character typeWeightMost you can fit in one post
Latin, punctuation, common symbols1280
Emojis2140 emojis
CJK (Chinese, Japanese, Korean)2140 characters
Other Unicode2 (default)Varies

That table is the official summary. The precise weights live in the twitter-text configuration file that X tells developers to use [1][2][3]. In version 3 of that file, the scale is 100 and the default weight is 200, so a default character costs 200 ÷ 100 = 2. Listed Unicode ranges are given a weight of 100, so they cost 1. The weight-1 ranges are:

  • U+0000 to U+10FF (this includes Latin, Greek, Cyrillic, Hebrew, Arabic and many Indic scripts, not only “Latin letters”)
  • U+2000 to U+200D (some general punctuation, including the zero-width joiner)
  • U+2010 to U+201F (hyphens and quotation marks)
  • U+2032 to U+2037 (prime marks)

Everything outside those ranges uses the default weight of 2. That is why CJK ideographs, hiragana, katakana and Hangul syllables each cost 2, even though the official summary describes the default simply as “Other Unicode.” If you are counting a language that is not Latin and not CJK, do not guess: run twitter-text or look the code point up in those ranges. Arabic and Devanagari, for example, sit inside U+0000–U+10FF and cost 1, not 2.

Why short URLs cost more and non-Latin scripts split

Two parts of config/v3.json surprise writers most often when moving between languages or adding links [1][3]:

Script and link edge cases in twitter-text v3
Input typeConfig rule in v3.jsonWeighted costPractical effect
Arabic, Hebrew, Cyrillic, Greek, DevanagariInside U+0000–U+10FF (weight 100 / scale 100)1 per charFits up to 280 characters, despite non-Latin script [3]
Chinese, Japanese, Korean (CJK / Kana / Hangul)Outside weight-1 ranges → defaultWeight: 2002 per charMax 140 characters in a single post [1][3]
Any valid URL (even https://x.com, 13 chars)transformedURLLength: 2323 per URLShort links gain +10 characters; long tracking URLs shrink to 23 [1][3]
Emoji ZWJ sequence (e.g. 👨‍👩‍👧‍👦, 11 UTF-16 units)emojiParsingEnabled: true2 totalCounted as one grapheme at weight 2, not per code point [1][2]

Emoji always cost 2, even long ones

The official page is explicit: “All emojis count as 2 characters, regardless of complexity.” A lone emoji, an emoji with a skin-tone modifier, an emoji joined with a zero-width joiner, and a family sequence built from several people and joiners all cost 2 [1]. Zero-width joiners combine the glyphs visually but do not add to the count.

This behaviour comes from emojiParsingEnabled, which is true in the current configuration [2][3]. When that flag is on, a whole emoji grapheme is treated as one unit with the default weight of 2, instead of adding up every code point inside it. We confirmed the official examples in the library: 👾, 🙋‍♂️ and 👨‍👩‍👧‍👦 each weigh 2.

Every URL costs 23 characters

X wraps links with its t.co shortener. The official rule is that every valid URL in the post counts as 23 characters, “regardless of the original length” [1]. The configuration field is transformedURLLength, and its value is 23 [2][3]. A short address and a long one with a path therefore cost the same:

URL cost in twitter-text, checked November 2026
Text as typedTyped lengthWeighted length on X
https://example.com1923
https://example.com/very/long/path3423

A short link can therefore “cost more” than it looks, and a long tracking URL costs no more than a short one. If you type several links, you pay 23 for each of them.

Mentions, media and hashtags

The official special-case table is short [1]:

  • Auto-populated @mentions at the start of a reply do not count. Mentions you add yourself count normally.
  • Attached media, when added through official clients, counts as 0 characters.
  • Hashtags count normally: the # and the tag text all contribute their usual weights. #hashtag weighs 8 in twitter-text.

Text is normalised to NFC first

X calculates length after Unicode Normalisation Form C (NFC) [1]. A precomposed character and a decomposed one that look the same are therefore counted as the same thing once they have been normalised. The official example is café: the composed form (one code point for é) and the decomposed form (e plus a combining acute accent) both count as 4 characters after NFC, not 5. We ran both strings through twitter-text and both returned a weighted length of 4.

The X API also requires UTF-8 encoding [1]. Encoding is not the same thing as the weighted length. A Chinese character is several UTF-8 bytes and still costs 2 against the 280 cap, not one per byte. The companion guide Characters, bytes and weights separates those measurements.

Worked examples

Each row below was produced by running the official twitter-text library on 11 November 2026. You can paste the same strings into a tool that uses that library, or into X’s own composer, and you should see the same weighted length.

Weighted lengths from twitter-text
TextWeighted lengthWhy
Hello5Five Latin letters, each weight 1.
Hello, world! 👋16The official sample: 14 Latin characters and spaces, plus one emoji that costs 2. [1]
你好世界8Four Chinese characters, each weight 2.
140 × 你280Exactly at the cap; a 141st 你 is rejected (weighted length 282).
280 × A280Exactly at the cap; a 281st A is rejected.
See https://counttext.net/guides/ now31See (4) + the URL (23) + now (4).
Family emoji 👨‍👩‍👧‍👦2One emoji grapheme, not the sum of the people and joiners inside it.

What CountText shows, and what it does not

CountText counts visible characters. One emoji is 1, one Chinese character is 1, and a URL costs as many characters as you typed. That is the right number for many forms and for a first draft, and it is the wrong number for an X post.

To stay inside 280 on X:

  1. Draft in the CountText counter so you can see the plain character total and edit quickly.
  2. Remember the conversions: CJK and emoji will roughly double, and each link will become 23, which may be more or less than the typed length.
  3. Leave a margin if the post mixes languages, emoji and links, then paste it into X’s composer. The composer is the final judge, and it already applies these weights live.

Some paid X plans allow posts longer than 280 characters. The limit depends on the plan and the app, so we do not print a single figure. If your composer shows a higher cap, believe that number for that account.

Frequently asked questions

Does every character count as 1 toward X’s 280-character limit?

No. X uses a weighted 280-character cap. Most Latin letters, common punctuation and many other scripts in a published range cost 1. Emoji and Chinese, Japanese and Korean characters cost 2 each. The official documentation tells developers to use the twitter-text library for the exact figure. [1][2]

How many Chinese characters can I put in one X post?

140. Each Chinese, Japanese or Korean character weighs 2, so a post made only of those characters reaches the 280 cap at 140 characters. [1] We confirmed that 140 copies of 你 are valid and 141 are not.

How does X count a URL?

Every valid URL counts as 23 characters, regardless of its original length, because X wraps links with the t.co shortener. [1] A short address and a long address with a path both cost 23.

Do emoji with skin tones or family sequences cost more than 2?

No. Official documentation says all emojis count as 2 characters, regardless of complexity, including skin-tone modifiers and sequences joined by zero-width joiners. [1] A family emoji still costs 2.

Why does café counted by hand as five code points still fit as four characters on X?

X normalises text to Unicode Normalisation Form C before it counts. [1] A decomposed é (the letter e plus a combining accent) is composed into a single character, so both café and the decomposed form weigh 4.

Sources (checked November 2026)

  1. X Developer Platform, Counting Characters. Official description of the 280-character cap, the weight table (Latin 1, emoji 2, CJK 2, other Unicode 2 by default), the 23-character URL rule, emoji sequences, reply mentions, attached media, hashtags, UTF-8 and NFC normalisation. We read the page on 11 November 2026, including the Markdown version at counting-characters.md.
  2. twitter-text, official open-source library, and its configuration README. X’s Counting Characters page tells developers to use this library. The README documents maxWeightedTweetLength, scale, defaultWeight, emojiParsingEnabled and transformedURLLength.
  3. twitter-text configuration, config/v3.json (version 3: maxWeightedTweetLength 280, scale 100, defaultWeight 200, emojiParsingEnabled true, transformedURLLength 23, and the weight-1 Unicode ranges listed above). We also ran the published twitter-text library on the example strings in this guide on 11 November 2026.

Try it: Open the CountText counter to see characters, paragraphs and a whitespace-based word count as you type. Your text stays in your browser. CountText does not apply platform-specific weights, so always finish in the real composer.