Social Threader is a web-based tool that helps you break long text into smaller chunks ideal for social media platforms like Twitter/X, Bluesky, Threads, and Mastodon. It intelligently preserves sentence structures and punctuation while respecting character limits.
You can find the page ready to for threading texts at https://threader.mprlab.com
-
Multiple Platform Support: Pre-configured for popular social media character limits
- Twitter/X (280 characters)
- Bluesky (300 characters)
- Threads/Mastodon (500 characters)
- Custom length option
-
Smart Text Processing
- Preserves punctuation with preceding words
- Maintains quote integrity
- Optional sentence-aware breaking
- Intelligent chunk optimization
-
User-Friendly Interface
- Real-time character, word, and sentence counting
- One-click copying for each chunk
- Visual thread preview
- Responsive design for mobile and desktop
-
Advanced Features
- Optional post enumeration (e.g., 1/5, 2/5, etc.)
- Custom chunk size support
- Dynamic font sizing
- Auto-expanding text areas
- Inline image support with clipboard-friendly copying
-
Input Text
- Paste or type your text in the left panel
- See real-time statistics for your input
-
Choose Breaking Method
- Select a preset platform button (Twitter, Bluesky, etc.)
- Or enter a custom character limit
- Toggle "Break on full sentences" if desired
- Enable post enumeration if needed
-
Review and Copy
- See your text broken into optimal chunks
- Each chunk shows character count and other stats
- Use "Copy" buttons to easily copy individual chunks
- Visual indicators show copied chunks in order
- Paste or drag images directly into the editor; each image becomes its own chunk alongside surrounding text.
- Copied image chunks include the PNG data, HTML markup, and accessible alt text so screenshots can be reposted without manual downloads.
- When the browser cannot perform a rich clipboard write, the app falls back to copying plain text so text-only chunks continue to work on restrictive browsers.
- ES-module entry point at
js/app.jsorchestrates initialization. - Core text processing lives in
js/core/chunking.jswith// @ts-checkand JSDoc annotations. - DOM-facing view models reside in
js/ui/, coordinated byThreaderController. - Constants, presets, and user copy live in
js/constants.jsto avoid magic strings.
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Responsive design for mobile devices
- No build tooling required; open
index.htmldirectly
- Run
npm installto install the Happy DOM harness along with the Puppeteer regression runner. - Execute
npm testto run the Happy DOM harness (npm run test:headless) followed by the Puppeteer browser suite (npm run test:browser). The command mirrors the sequence executed in CI so local runs surface the same failures. - The Puppeteer suite (
tests/puppeteerSuite.js) opensindex.html, injects rich text markup, and verifies the live statistics rendered in the UI. - Continue to use the
?test=truequery flag in a manual browser session to view the in-browser harness reporter.
.github/workflows/browser-tests.ymlruns on pull requests and pushes that modify application code or test tooling. The single job executes the Happy DOM harness first and then the Chromium-only Puppeteer suite, matching the defaultnpm testflow.- The workflow caches the Chromium download used by Puppeteer and executes the same commands developers run locally for consistent feedback.
- Clone the repository:
git clone https://github.com/MarkoPoloResearchLab/social_threader.git- Install development dependencies for tests:
npm install- Open
index.htmlin a web browser to use the app directly.
The application remains a static HTML/CSS/JS bundle, while the optional tooling supports automated testing.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for better thread creation tools
- Built with modern web standards
- Community feedback and contributions welcome
MPR Lab Support - @MprlapSupport
Project Link: https://github.com/MarkoPoloResearchLab/social_threader
Made with ❤️ for the social media community