TextyConverterbeta
⌘K

Wrap Text at N Characters

Word-wrap text to a target column width. Breaks at spaces; never splits a word.

characters

About Wrap Text at N Characters

This tool wraps long lines so no line exceeds N characters. It breaks at whitespace, so words stay intact. Single words longer than the target width are pushed onto their own line. Existing line breaks in the input are preserved as paragraph breaks; the wrapping happens within each paragraph.

When to use it

  • Formatting prose for a fixed-width display (terminal, email, plain-text doc)
  • Wrapping commit messages to 72 characters
  • Preparing text for a column-limited CMS or social platform
  • Tightening up word-wrapping after an edit shifted line lengths

How it works

Each existing line is treated as a separate paragraph. Within a paragraph, words are accumulated until adding the next word would exceed the width — at that point a newline is emitted. Words longer than the width are placed on their own line. Existing newlines between paragraphs are preserved.

Examples

The quick brown fox jumps over the lazy dog and runs through the meadow.
(width=20)
The quick brown fox
jumps over the lazy
dog and runs through
the meadow.

Frequently asked questions

Does it preserve existing paragraph breaks?
Yes. Each existing line is wrapped independently. Blank lines between paragraphs stay blank.
What if a word is longer than the target width?
It goes on its own line — it's not broken in the middle. To force a hard break, use the add-line-breaks tool instead.
Is the width based on characters or columns?
Characters (Unicode code points). For East Asian wide characters, the visual column width may exceed the character count.

Related tools