What Is Word Wrap Tool?
Reformat long plain-text lines with four distinct workflows. Soft Wrap respects existing lines and prefers ASCII spaces or tabs. Hard Wrap cuts at grapheme boundaries. Paragraph Wrap joins adjacent nonblank lines before wrapping. Code Wrap repeats leading indentation on continuations.
How to Use Word Wrap Tool
Paste text, choose a mode and enter a width from 10 to 500. Keep long words by default, or choose Break or literal Hyphenate when splitting is acceptable. Remove leading ASCII indentation only if you intend to change it. Mixed whitespace-and-mark graphemes are retained whole. Review trailing spaces and copy or download TXT.
How Word Wrap Tool Works
Each input line is segmented into grapheme clusters using Intl.Segmenter. Soft modes choose the last ASCII whitespace cluster within the available width; the whitespace stays with the preceding line. Keep can exceed width. Hyphenate inserts a literal hyphen without dictionary or language rules. Hard ignores the long-word choice. Paragraph mode replaces each internal physical separator with one ASCII space, retaining blank boundary lines. Code mode subtracts indentation from available width and reports an error if no room remains.
See Unicode text segmentation for the difference between grapheme boundaries and language-aware line breaking. Runtime Unicode versions may differ.
Word Wrap Tool Example
Width 10 illustrates why the mode matters. New line markers in the table describe actual output separators; trailing space is spelled out.
| Input and setting | Result |
|---|---|
| Soft, alpha beta gamma | alpha + trailing space, then new line + beta gamma |
| Paragraph, alpha + new line + beta | alpha beta |
| Hard, 123456789 followed by a joined emoji | Nine digits and one complete emoji fit in the first ten graphemes |
| Code, ten leading spaces + A, width 10 | Error: indentation leaves no room |
When to Use Word Wrap Tool
Prose drafts
Reflow pasted paragraph lines while keeping blank boundaries.
Fixed-unit samples
Use Hard to compare grapheme chunks without splitting joined characters.
Indented notes
Repeat indentation in plain-text examples, then review the width.
Common Mistakes
Wrapping changes physical lines, unlike visual wrapping in a text editor. Code Wrap can break executable syntax, literals or identifiers. Paragraph reflow changes existing line boundaries and adds spaces. Graphemes are not terminal cells, bytes or pixels; CJK text and tabs may display wider. Whitespace-only lines remain unwrapped and may exceed width. Blank lines and original CRLF/LF/CR boundaries remain unless indentation removal is selected. Inserted wrap separators use the source line ending, or LF on an unterminated line.
Input is limited to 1,000,000 UTF-16 units and 20,000 physical lines. Output is limited to 5,000,000 units and 20,000 lines. Invalid settings clear output and disable export; these budgets are not a browser speed guarantee.
Tips for Better Results
Keep an original copy when changing paragraph structure or inserting hyphens. For indentation conversion, use the dedicated Tabs/Spaces tool before wrapping and inspect the result. The selected width is a formatting preference, not email or platform compliance.
Convert Tabs/Spaces and Center Text handle different spacing tasks.