<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: shuangqian liu</title>
    <description>The latest articles on DEV Community by shuangqian liu (@shuangqian_liu_e4216e385a).</description>
    <link>https://dev.to/shuangqian_liu_e4216e385a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4236472%2F8163feed-00cc-437d-91d8-1e3d4b10f87b.png</url>
      <title>DEV Community: shuangqian liu</title>
      <link>https://dev.to/shuangqian_liu_e4216e385a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shuangqian_liu_e4216e385a"/>
    <language>en</language>
    <item>
      <title>I built a free character counter that handles X's weighted length and SMS segments</title>
      <dc:creator>shuangqian liu</dc:creator>
      <pubDate>Tue, 10 Nov 2026 07:07:09 +0000</pubDate>
      <link>https://dev.to/shuangqian_liu_e4216e385a/i-built-a-free-character-counter-that-handles-xs-weighted-length-and-sms-segments-3k69</link>
      <guid>https://dev.to/shuangqian_liu_e4216e385a/i-built-a-free-character-counter-that-handles-xs-weighted-length-and-sms-segments-3k69</guid>
      <description>&lt;p&gt;I kept hitting the same problem: a draft that looked short enough would get&lt;br&gt;
rejected by X, Instagram or an SMS gateway. Each platform counts characters&lt;br&gt;
differently, and most counters only give you one number.&lt;/p&gt;

&lt;p&gt;So I built CharCountLab, a small static site with four focused tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Character Counter: characters with and without spaces, words, sentences,
paragraphs, reading and speaking time&lt;/li&gt;
&lt;li&gt;Twitter Character Limit: X's weighted length (URLs cost 23, emoji and CJK
cost 2) against the 280 limit&lt;/li&gt;
&lt;li&gt;Instagram Caption Character Limit: 2,200 characters plus hashtag and
mention counts&lt;/li&gt;
&lt;li&gt;SMS Character Limit: GSM-7 vs Unicode, 160 / 153 / 70 / 67, and how many
segments you'll be billed for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything runs in the browser. No signup, no upload, no tracking — your text&lt;br&gt;
never leaves the device. The pages are plain HTML with the content in the&lt;br&gt;
source, so they are readable without JS and need no build step.&lt;/p&gt;

&lt;p&gt;A few things I learned while building it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One emoji flips an entire SMS from GSM-7 (160 chars) to Unicode (70),
doubling the cost&lt;/li&gt;
&lt;li&gt;Instagram collapses captions after about two lines, so the first 125
characters matter more than the 2,200 limit&lt;/li&gt;
&lt;li&gt;A URL in an X post always costs 23 characters, however long the link is&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it: &lt;a href="https://charcountlab.pages.dev/" rel="noopener noreferrer"&gt;https://charcountlab.pages.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've run into a counting rule I've missed, I'd love to hear about it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>showdev</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
