Text Wrapper
Hard-wrap text at 72, 80 or any column width on word boundaries, with indentation, quote prefixes and paragraph re-flow.
This guide is not yet available in your language and is shown in English.
Tool guide
What this tool does
Text Wrapper inserts line breaks so that no line exceeds the width you choose, breaking only between words. It can re-flow paragraphs that were wrapped at a different width, indent every line, add a prefix such as “> ” or “// ”, and optionally split words that are longer than the limit.
Many places that show text never wrap it for you: terminals, plain-text email, git commit messages, code comments and fixed-width printouts. Long lines either scroll off to the side or get chopped at awkward points. Conventions grew up to avoid this; RFC 5322 recommends email lines of no more than 78 characters, and git tooling expects commit bodies around 72.
This wrapper uses a greedy algorithm: it adds words to the current line until the next one would cross the limit, then starts a new line. Widths are measured in user-perceived characters, so an emoji or an accented letter counts once. With re-flow on, existing line breaks inside a paragraph are joined first, which lets you rewrap text from one width to another; blank lines keep paragraphs apart. The prefix and indent are included in the width. It all happens in your browser.
How to use Text Wrapper
- Paste the text you want to wrap, or click Sample.
- Pick a “Line width” preset such as 72 for email, or choose Custom and enter your own value.
- Keep “Re-flow paragraphs” on to rewrap already wrapped text; turn it off to treat every existing line separately.
- Decide whether to “Break words longer than the width”; leave it off to keep URLs whole.
- Add an Indent or a “Line prefix” like “> ” for quoted replies or “# ” for comments.
- Choose line endings, check “Longest line” in the statistics, and copy or download the result.
Tips for better results
- For git commits, keep the subject line at 50 characters and wrap the body at 72.
- Wrapping with a “// ” prefix turns a paragraph into a neatly formatted code comment block.
- Turn re-flow off for lists and addresses so each existing line stays on its own.
- Wide characters such as Chinese ideographs take two columns in most terminals, so use a smaller width for CJK text.
Common use cases
- Formatting a plain-text email or newsletter so it reads well in any mail client.
- Rewrapping a README section that was edited and now has uneven line lengths.
- Preparing text for a receipt printer or a fixed-width display with a strict column limit.
- Quoting a message with “> ” prefixes when replying in a mailing list.
Common mistakes to avoid
- Hard-wrapping text that will be shown in a web page or word processor, which then wraps it again and creates ragged lines.
- Forgetting that the prefix and indent use part of the width, so the text itself gets fewer characters.
- Re-flowing Markdown lists or code, which joins separate items into one paragraph.
Frequently asked questions
What happens to words longer than the line width?
By default they are placed on a line of their own and allowed to overflow, so URLs and file paths stay intact. Turn on “Break words longer than the width” to split them into chunks of exactly the width.
Why are 72 and 80 characters common widths?
Eighty columns comes from IBM punched cards and early terminals. Seventy-two leaves room for the “> ” quote marks added in email replies and for indentation in tools such as git log, so the text still fits in 80 columns.
Does it count emoji correctly?
Yes. Width is measured in grapheme clusters, so an emoji built from several code points, such as a family or a flag, counts as a single character and is never split.
How do I undo hard wrapping?
Use Remove Line Breaks to join the lines back into flowing paragraphs, or wrap again here with a larger width and re-flow switched on.
Feedback & suggestions
Help us improve Text Wrapper. We read every message.