FIRST CH TOOLS / Text / 04 CHARACTER COUNTER
Character Counter
Paste text to count characters with and without spaces, words, lines and bytes at once. Set a limit and the part past it turns red.
Posts on X are counted differently (CJK = 2, every URL = 23). Use the X (Twitter) Post Counter to see exactly where a post goes over.
Your text is never stored or sent anywhere (it is gone when you close the page).
How to Use
- Paste your textCharacters, characters without spaces, words, lines and the rest update the moment you type.
- Set a limitIf a form says “400 characters max”, enter 400. The part past the limit turns red and you see how many characters to cut.
- Posting on X? Use the X counterX counts weight, not characters. This page shows the weight, but the exact overflow point and the URL / hashtag breakdown are on the dedicated page.
About This Tool
One character is one visible character (grapheme). Emoji and combining sequences count as one even when they are made of several code points (👨👩👦, 🇯🇵 and 1️⃣ are each 1). Old browsers without Intl.Segmenter fall back to code points, so emoji-heavy text counts higher there.
Spaces and lines. “Without spaces & newlines” removes spaces, tabs and newlines, including the ideographic space (U+3000). Lines are newlines + 1, so a trailing newline adds an empty line.
Words come from the word segmentation of Intl.Segmenter. For English this matches splitting on spaces and punctuation; for Japanese and Chinese it is an estimate from the browser’s dictionary. Genkō yōshi is the Japanese 400-square manuscript sheet (20 × 20); each newline starts a new row, and line-start punctuation rules are not applied.
The same string, different counts (worked examples)
Whether a “max 400” field accepts your text depends on what unit it counts. These values come from this page’s own calculation — paste the same string and you get the same numbers.
| String | Visible characters | UTF-16 (JavaScript length, maxlength) | UTF-8 bytes | X weight |
|---|---|---|---|---|
| Hello, world | 12 | 12 | 12 | 12 |
| 文字数カウント (Japanese) | 7 | 7 | 21 | 14 |
| 👨👩👦 (family emoji) | 1 | 8 | 18 | 2 |
| ガ (one code point) / カ + combining mark | 1 / 1 | 1 / 2 | 3 / 6 | 2 / 2 |
| https://tools.first-ch.com/moji/?utm_source=x | 45 | 45 | 45 | 23 |
An HTML maxlength is measured in UTF-16 code units, so one family emoji uses up 8 of it. A letter written with a combining mark looks identical to the precomposed one but takes twice the bytes (X normalizes posts to NFC before counting, so both weigh 2).
How X counts a post
The X limit is 280 weight, not 280 characters. CJK characters and full-width symbols weigh 2; Latin letters, digits and ASCII punctuation weigh 1; every URL weighs 23 whatever its length; an emoji weighs 2 however many code points it has. A Japanese-only post hits the limit at 140 characters. The “X weight” here uses the same calculation as the X (Twitter) Post Counter, which also shows the overflow point, the URL / mention / hashtag breakdown and a trim-to-limit button. The button that moves you there copies your draft to the clipboard instead of putting it in the URL. We checked the weights against twitter-text 3.1.0 (npm), X’s own counting library, on 25 strings — 140 vs 141 Japanese characters, long and scheme-less URLs, family and flag emoji, combining characters (NFC), mentions and hashtags — and all of them match (2026-11-01).
Sources
- X Developer Platform, “Counting characters” — 280 limit, CJK = 2, URL = 23, emoji = 2, NFC normalization (checked 2026-11-01)
- twitter/twitter-text, “config/v3.json” — weight-1 code point ranges (0–4351, 8192–8205, 8208–8223, 8242–8247) and URL length 23 (checked 2026-11-01)
- MDN Web Docs, “HTML attribute: maxlength” — length is measured in UTF-16 code units (checked 2026-11-01; page last modified 2026-04-20)
Your text never leaves the browser — every count is computed locally. You can also open the page with parameters: /en/moji/?text=any%20text&limit=400 (text put in a URL reaches the server as part of the page request).
From AI Agents
Character counts (with and without whitespace), full-/half-width counts and lines are also available as the count_chars tool in our MCP (Model Context Protocol) server @first-ch/tools-mcp, callable directly by AI agents with no browser needed (words, manuscript sheets, bytes and the limit check are on this page only). Its x_weight uses the same calculation as the X (Twitter) Post Counter (version 0.63.0 and later). See Using These Tools from AI Agents for setup details.
Install
claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
Example call
# example input passed to the agent count_chars(text="text to count")
Other Tools
Tools people often open after counting a draft
42X (Twitter) Post CounterA post on X is measured by weighted length, not by plain characters: CJK and full-width count 2, every link counts 23, and the limit is 280. Paste a draft to see the weight, what is left and the tail that will not fit, with URLs, mentions and hashtags detected.
41Full-width ⇄ Half-width ConverterTidies the character widths in a manuscript, or in text you are about to import as CSV. Choose half-width, full-width or as-is for letters and digits, katakana, symbols and spaces; ガ comes back as one character, ガ. Leftover ideographic spaces are flagged, and invisible characters such as zero-width spaces can be removed.
61SERP Preview & Meta Tag Length CheckerSee how your title and meta description appear in Google search results and where they get cut off. The verdict is pixel width, not character count, so it matches the real truncation in any language. Desktop and mobile previews side by side.
63Text Line ToolsRemove duplicate lines, sort ascending or descending, shuffle, number lines, drop blank lines, trim spaces and add a prefix or suffix — tick the steps and they run in one pass. Numbers sort by value, so item2 comes before item10.
15Text & Code Diff CheckerCompare two versions of a contract, a draft or some code. Additions, deletions and changes are highlighted line by line and word by word, in an inline or side-by-side view, and you can export a unified diff (.patch).
Browse all 86 other tools by category
Images20
- 01Batch Image → WebP ConverterWebP Converter
- 02White Background RemoverWhite BG Remover
- 09Favicon GeneratorFavicon Generator
- 12Batch Image → AVIF ConverterAVIF Converter
- 34Image Resizer & Cropper画像リサイズ&クロップ
- 35EXIF Viewer & RemoverEXIF情報の確認&除去
- 47SVG Optimizer & Data URISVG最適化&data URI化
- 54Social Media Image ResizerSNS画像サイズ一括書き出し
- 58HEIC to JPEG/PNG ConverterHEIC Converter
- 64Screenshot Frame & Background Makerスクリーンショット枠装飾
- 68OGP Image GeneratorOGP画像ジェネレーター
- 69Stamp Shape Generatorスタンプ形ジェネレーター
- 71Screen Recorder with Click Auto-Zoom画面録画+クリック自動ズーム
- 723D Device Mockup Generator3Dデバイスモックアップジェネレーター
- 74Screen Review Board画面レビューボード
- 79Code to Imageコード画像化
- 82Profile Icon Preview: Old vs Newアイコンの丸切り抜きプレビュー
- 83Silent Sleep Camera寝顔を撮る無音カメラ
- 8512 Months in Photos今年の12枚
- 87Pixel Art Normal Map GeneratorDot Light
Design14
- 03WCAG Contrast CheckerContrast Checker
- 21PX ⇄ REM / EM ConverterPX ⇄ REM / EM 単位変換
- 22Color Converter & Alphaカラーコード変換&アルファ透過
- 27Aspect Ratio Calculatorアスペクト比計算&サイズ算出
- 43CSS clamp() Fluid Typography CalculatorCSS clamp() 計算機
- 44CSS Gradient GeneratorCSSグラデーションジェネレーター
- 45Image Colour Palette Extractor画像からカラーパレット抽出
- 51cubic-bezier Easing Preview & ComparisonEasing Preview
- 52CSS box-shadow Generatorbox-shadow ジェネレーター
- 59Print Size & DPI Calculator印刷サイズ・DPI計算機
- 60Color Blindness SimulatorColor Blindness Simulator
- 62Flexbox & CSS Grid GeneratorFlexbox / CSS Grid ジェネレーター
- 77e-Stat CSV to Charte-Stat CSV かんたんグラフ化
- 81Site Style to AI Brand Guideサイトのスタイル→AI向けブランドガイド
Text13
- 07Markdown → PDFMD → PDF
- 11Encoding & Line Ending ConverterEncoding Converter
- 14Marp Markdown → SlidesMarp Slides
- 15Text & Code Diff CheckerDiff Checker
- 19HTML Entity Escape & UnescapeHTML Escape
- 28Markdown Table & CSV/TSV ConverterMarkdownテーブル整形&CSV/TSV変換
- 38Case Converter文字列ケース変換
- 41Full-width ⇄ Half-width Converter全角⇄半角変換&テキストクリーナー
- 42X (Twitter) Post CounterX(Twitter)投稿の文字数計算(重み付き)
- 53Japanese Dummy Text Generator和文ダミーテキスト生成
- 57HTML → MarkdownHTML→Markdown変換
- 63Text Line Toolsテキスト行操作ツール
- 80Wiki Duplicate, Orphan & Term Checker社内文書の重複・孤立・表記ゆれチェッカー
SEO & AI8
- 05llms.txt Generatorllms.txt Generator
- 06JSON-LD GeneratorJSON-LD Generator
- 08OGP Meta Tag WizardOGP Wizard
- 36robots.txt Generatorrobots.txt ジェネレーター
- 48Redirect Generatorリダイレクトルール ジェネレーター
- 61SERP Preview & Meta Tag Length CheckerSERPプレビュー&メタタグ文字数チェック
- 66URL Slug Generator (Japanese → Romaji)URLスラッグ生成(日本語→ローマ字)
- 78FAQ Schema (JSON-LD) & Markdown GeneratorFAQ構造化データ(JSON-LD)&Markdown ジェネレーター
Dev16
- 13Test Data GeneratorTest Data Generator
- 16Cron Expression ExplainerCron Explainer
- 17Base64 & Data URI EncoderBase64 & Data URI
- 18URL Parameter Editor & UTM BuilderURL Parameters
- 20JSON ⇄ YAML ConverterJSON ⇄ YAML
- 23MD5 / SHA-256 Hash Generatorハッシュ生成
- 24JWT Decoder & Expiry CheckerJWTデコーダー&有効期限チェッカー
- 25User-Agent ParserUser-Agent解析&デバイス判定
- 26UUID & ULID GeneratorUUID (v4) & ULID 一括生成
- 29SQL Query FormatterSQLクエリ整形(フォーマッター)
- 31Regex Tester正規表現テスター
- 32Unix Timestamp ConverterUNIXタイムスタンプ⇄日時変換
- 39CSV/TSV ⇄ JSON ConverterCSV/TSV ⇄ JSON 相互変換
- 49IP / CIDR CalculatorIPアドレス・CIDR計算機
- 67htpasswd Generatorhtpasswd ジェネレーター
- 73OpenAPI Docs & TS Types GeneratorOpenAPI→日本語ドキュメント&TS型定義
Other15
- 10TikTok PublisherTikTok Publisher
- 30QR Code GeneratorQR Code Generator
- 33New Tab Memo新規タブメモ帳
- 37Password Generator安全なパスワード生成
- 40PDF Merge, Split & ExtractPDF結合・分割・ページ抽出
- 46QR Code ReaderQRコード読み取り
- 50ICS Calendar Event GeneratorICS Generator
- 55Time Zone Converter & World Clockタイムゾーン変換・世界時計
- 56Date & Business Day Calculator日数・営業日計算
- 65Japanese Era ⇄ Western Calendar Converter和暦 ⇄ 西暦変換
- 70Stay Awakeスリープ防止
- 75AI Decision JournalAI活用案件の判断記録
- 76Card Binder Plannerカードバインダー配置プランナー
- 84Instagram PublisherInstagram投稿ツール
- 86Inner Envelope Box Fitterご祝儀袋・香典袋の中袋用 記入下書き