Dev.to WebDev 🛠 Dev 👁 2 📖 2 min read

I built 7 free, no-signup tools for people who post to many social networks

Every social network has its own idea of how much you can say. X, Bluesky, Mastodon, LinkedIn and Threads all count differently, and I got tired of posting something that looked fine in my editor and then got cut off or

Every social network has its own idea of how much you can say. X, Bluesky, Mastodon, LinkedIn and Threads all count differently, and I got tired of posting something that looked fine in my editor and then got cut off or rejected somewhere else. So I built a few small tools for myself and ended up putting them online for anyone to use. There are 7 of them, they are free, and none of them need an account.

The tools

The technical detail I found most interesting

"Length" is not one number. X counts every URL as 23 characters, no matter how long the link really is. It also counts some emoji and CJK characters as 2 instead of 1. Bluesky, on the other hand, counts graphemes, which means a family emoji built from several code points still counts as one.

If you just use string.length in JavaScript you get UTF-16 code units, which is wrong for both. So the counter uses Intl.Segmenter to split text into graphemes, and then applies each network's own rules on top:

const seg = new Intl.Segmenter(undefined, { granularity: "grapheme" });
const graphemes = [...seg.segment(text)].length;

It is built into modern browsers, so there is no library to ship. The URL and wide-character rules for X are layered over that count.

Privacy

Everything runs client-side in your browser. Your text is not sent to a server, and there is no tracking on these pages.

Feedback

I would love to hear where the counts or sizes are off for your case, since these rules change over time.

These tools are made by the team behind PulsePost, a scheduler for social posts (https://nindzia.com). Which tool should we add next?

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.