Wrap & Unwrap Text
Hard-wrap text at a column width with greedy word wrapping, indents and a line prefix; unwrap lines back into paragraphs; or re-flow to a new width.
Text wrapped, unwrapped or re-flowed, with line and paragraph counts, the longest line, and notes on words longer than the width (left whole or broken as you choose).
Example: A sentence wrapped at 30 with a two-space hanging indent takes four lines, none over 30; "The quick / brown fox. / Next sentence / here." unwraps to one line with two spaces after the full stop.
Greedy wrap,
by character count.
The wrapping rule, indents and prefixes, and what unwrap does.
Wrapping
Words are placed on a line while the line stays within the width; the next word that does not fit starts a new line — the greedy rule every editor and mail client uses. A word longer than the width sits alone on its line, or is broken at the width if you allow it. Paragraphs (blank-line separated) are wrapped independently and kept apart.
Indents and prefix
A first-line indent and a hanging indent count toward the width; a line prefix such as "> " or "// " is added outside it. Width is counted in characters (code points), so a proportional font will not line up exactly and a tab counts as one.
Unwrap and re-flow
Unwrap joins the lines of each paragraph with single spaces (two after . ! ? if you prefer) — the reverse of a hard wrap. Re-flow unwraps first, then wraps to the new width. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- Greedy word wrap: words placed while the line stays within the width, else a new line; width in characters (code points); paragraphs split on blank lines; overlong words whole unless breaking is on
Last reviewed 21 September 2026. How results are checked: How we verify.