Text Wrapper Online
Hard-wrap text to a chosen column width on word boundaries.
Text Tools Runs in your browser
80
How do you wrap text to a set width?
Hard wrapping walks each paragraph word by word, starting a new line whenever adding the next word would push past your chosen width — anywhere from 10 to 160 columns via the slider. Breaks land only on spaces; a word longer than the limit gets its own line instead of being chopped. Paragraph gaps are kept, so 72-column commit messages and emails come out clean.
How to use the Text Wrapper
- 1 Paste text with over-long lines.
- 2 Set the maximum width anywhere between 10 and 160 columns with the slider.
- 3 Watch lines re-break at word boundaries as you adjust.
- 4 Copy the wrapped version once the width looks right.
What you can use it for
- Wrapping email or commit messages to 72 columns.
- Reflowing long lines in plain-text files.
- Fitting text into fixed-width terminals.
- Formatting code comments to a line limit.
Frequently asked questions
Will it split a word in the middle?
No. The algorithm only breaks at spaces. If one word alone is longer than your chosen width, it is placed on its own line at full length rather than hyphenated or cut.
What width should I choose?
72 is the git convention for commit bodies and works for email; 80 matches most style guides for comments. Go narrower, down to 10, for columns and chat-sized snippets.
Are blank lines between paragraphs kept?
Yes. Wrapping is applied per paragraph, and the empty lines dividing paragraphs are carried through, so separate blocks never merge into one.
Related tools
More Text Tools
More tools like this:
All Text Tools