X preserves line breaks and blank lines in posts, so the job here is precision, not rescue: strip the trailing spaces that pasted drafts carry, keep the blank lines you meant, and know that every break spends part of the 280-character budget before you hit post.
How line breaks behave on X
- Line breaks count toward X's 280-character limit like normal characters. A skeleton-spaced post can burn 15 characters on formatting alone.
- Trailing spaces are the silent budget leak: invisible in the composer, still counted. End-trimming every line reclaims them.
- Blank lines survive on X, including several in a row. The one-liner, blank line, punchline structure renders exactly as written.
- If the cleaned text still does not fit, split it into a thread at a sentence boundary instead of deleting the spacing that makes it readable.