Wrap text to a fixed line length

Break long lines at a set width.

0 lines · 0 characters

0 lines · 0 characters

Results update as you type.

Runs in your browser. Nothing uploaded.

How to wrap text

  1. Paste your text into Input.
  2. Set Line length to the most characters a line may have. The text breaks at the last space that fits.
  3. Turn on Break long words if long strings must be cut too, then copy the result.

Common line lengths

Where Usual limit
Git commit summary line 50 characters
Git commit message body 72 characters
Plain-text email 72 to 78 characters
Python code (PEP 8) 79 characters
Classic terminal window 80 characters

These are conventions, not hard rules. If your team or project has its own style guide, use its number.

Hard wrap versus soft wrap

Editors and browsers usually soft wrap: a long line is shown across several rows on screen but stays one line in the file. This tool hard wraps. It inserts real line breaks, so the text keeps its shape wherever you paste it, whether that’s a terminal, a plain-text email or a fixed-width file. The downside is that hard-wrapped text doesn’t reflow, so it looks broken on a screen narrower than the line length or after someone edits a sentence in the middle.