Word Wrap — Reflow Text to a Column Width
Hard-wrap text to a fixed line width, breaking at word boundaries, in your browser.
Lines: 2 · Longest: 39
How to use
- Paste or type your text into the input box.
- Set the line width and choose whether to break overly long words.
- Copy the wrapped text from the output box.
About this tool
ShowHide
Paste text and hard-wrap it to a fixed line width. Each line is filled greedily with as many words as fit before a break is inserted at the next word boundary, which is the same approach a terminal or a plain-text mail client takes — good for commit message bodies at 72 columns, code comments, README paragraphs and anything that has to look right in a monospace font. Existing line breaks and blank lines are left alone, so paragraphs, lists and indented blocks keep their shape instead of being melted into one flow. A word longer than the width, such as a URL or a long identifier, is left to overhang by default; turn on hard breaking if the column limit matters more than the word. Everything runs locally — nothing is uploaded.
Frequently asked questions
Does it merge my existing lines?
No. Each input line is wrapped independently, so existing line breaks and blank lines are preserved. It only adds breaks, never removes them.
What happens to a word longer than the width?
By default it stays on its own line and overflows the width. Turn on 'Break long words' to split such words across lines at the width.
How is wrapping decided?
Words are packed greedily: each line takes as many whole words as fit within the width, then the next word starts a new line. Runs of spaces within a line collapse to single spaces.
Is my text sent anywhere?
No. Wrapping happens entirely in your browser; nothing is uploaded.
Why 72 columns for a git commit body?
Because git indents the body by four spaces when it shows a log, so 72 plus that indent sits inside the 80-column terminal width that everything else assumes. The subject line is conventionally shorter still, around 50, so it survives being listed in a narrow column.
Greedy wrapping leaves a very short last line. Can it balance them?
Not here. Greedy filling takes as many words as fit on each line, which is what a terminal and a plain-text mail client do, so the output matches how the text will actually be displayed. Balanced line lengths need a different algorithm and would no longer match those readers.
Related tools
Fixed-Width Text Parser to CSV / JSON
Split fixed-width / fixed-column text into fields by column widths and export as CSV or JSON, in your browser.
Convert
Column Aligner — Align Text into Columns
Pad whitespace, comma or tab separated rows into neatly aligned columns, in your browser.
Text
Character & Word Counter
Count characters, words, sentences, lines, and bytes in real time.
Text
Text Diff Viewer
Compare two pieces of text and see line-by-line or word-by-word additions and removals.
Text
Word Frequency Counter
Count how often each word appears in your text — with stopword filtering, minimum length, and CSV export.
Text
EPUB Viewer, Metadata & Text Extractor
Open an .epub in your browser: metadata, chapter list with word counts, the plain text, and the structure checks that explain why a reader rejects a book.
File