Skip to content

Word Wrap / Line Length Formatter

Wrap text at 72, 80 or any column with soft or hard breaks, preserved indentation and re-flow of already-wrapped text.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Paste the text and pick a width: 72 for email and commit messages, 80 for classic terminal, or type your own.
  2. 2.Choose soft wrap at word boundaries or hard wrap at the exact column, and set reflow and indentation handling.
  3. 3.Check the longest-line stat, then copy the wrapped result.

About Word Wrap / Line Length Formatter

Word Wrap reformats text to a maximum line length, the way editors, mail clients and terminals have done since fixed-width screens existed, and the way plain-text conventions still expect. Paste the text, pick a width, and get back the same words broken at the right places: soft wrap breaks at the last space that fits, and a hard-wrap toggle breaks at the exact column when you truly need every line under the limit.

The preset widths are the ones the conventions actually name. RFC 5322, the internet message format standard, says each line of a message must be no more than 998 characters and should be no more than 78; the traditional practice of wrapping body text at 72 leaves room for quoting levels to be added without re-wrapping, and the same 72-column habit carried into commit messages, where widely followed Git practice wraps body text so it survives indented display in logs. Eighty columns is the classic terminal width that code style guides still reference. All four presets, 72, 80, 100 and 120, are one click, and any width from 8 to 500 can be typed directly.

Structure survives the wrap. Blank lines are kept, and each paragraph wraps independently. The reflow option, on by default, first joins the existing line breaks inside a paragraph so already-wrapped text can be re-wrapped cleanly at a new width; switching it off wraps each existing line on its own, which is what you want when line breaks are meaningful. Indentation is preserved and accounted for: a paragraph that starts with four spaces keeps those four spaces on every continuation line, and the effective wrap width subtracts them, so indented blocks stay aligned instead of drifting. Quoted-email prefixes made of angle brackets are treated as indentation under the same rule, so replies keep their quoting structure.

Soft wrap never cuts a word: anything longer than the limit, a long URL, an unbroken identifier, stands alone on its own line, and the result reports how many such overlong words were left intact so nothing silently exceeds your limit without your knowledge. Hard wrap cuts at the exact column but will never split an emoji or any other character that occupies two code units, a correctness detail that naive column-cutters get wrong. Width is counted in Unicode code points, and the page states its one scope boundary plainly: East Asian full-width characters count as one, terminal double-width rendering is not simulated.

Soft wrapping is idempotent, so running the output through again at the same width changes nothing, which makes the tool safe in repeated pipelines. The result reports lines in, lines out and the longest output line. Input is capped at one million characters and wraps in a single linear pass, returning instantly even at that size. Everything runs in your browser; nothing is uploaded, stored or attached to an account. Use it for commit messages, mailing-list replies, code comments, man-page-style documents, or any destination that still reads best in honest fixed-width lines.

Methodology & sources

Split into paragraphs at blank lines, optionally reflow interior line breaks, then wrap each paragraph in a single pass that breaks at the last fitting space or at the exact column under hard wrap, preserving and width-accounting indentation, never splitting surrogate pairs, and counting width in Unicode code points with the East Asian width boundary stated.

Frequently asked questions

Why are 72 and 80 the presets?
RFC 5322 says message lines should stay within 78 characters, and wrapping at 72 leaves room for quote prefixes; 80 is the classic terminal width code style guides still cite. Both are conventions the standards actually document, and any width from 8 to 500 works.
What happens to a word longer than the limit?
Soft wrap never cuts words: the overlong word stands alone on its own line and the result reports how many such words were left. Hard wrap cuts at the exact column, but never in the middle of an emoji or other two-unit character.
Can it re-wrap text that is already wrapped?
Yes. The reflow option joins existing line breaks within each paragraph before wrapping, so old 60-column text re-wraps cleanly at 100. Switch reflow off when existing line breaks must be kept.

Text Tools guides

View all