Text Wrapper
Paste your text, set the line width in characters and pick what to do. Wrap long lines breaks only the lines that are too long. Reflow paragraphs joins the lines of each paragraph and fills them again, which fixes text that was wrapped at the wrong width. Unwrap to one line joins each paragraph into a single line. You can start every line with a prefix such as > or //, and cut words that are longer than a line. Everything runs in your browser.
The lines of each paragraph are joined and filled again to the width. A blank line separates paragraphs.
Spaces at the end are kept. The prefix counts toward the width.
4 lines in, 8 lines out, longest line 40 characters
Lines are broken only at spaces, and each line takes as many words as fit, so the result is the same as the word wrap of a text editor. Length is counted in characters, with an emoji counted as one, and not in the width a font draws, so a line of wide characters can look longer. A line that starts with spaces or tabs keeps that indent on every line it wraps into. Spaces at the end of a line are removed, and a line that already fits is not touched. Common widths are 78, which RFC 5322 says a line of an email message should not go past, and 80, the width of a classic terminal. Everything runs in your browser and nothing you paste is uploaded.
Related Tools
[5 suggestions]Remove Line Breaks
Strip line breaks and paragraph breaks from text, or join broken lines into clean paragraphs.
Line & ListsPrefix / Suffix Adder
Add text to the start and end of every line: quote and comma a list, or build a SQL IN list or a JSON array.
Line & ListsCharacter Counter
Count characters with and without spaces, plus code points, UTF-16 units and UTF-8 bytes.
Analysis & CountingWhitespace Remover
Strip unnecessary spaces, redundant tabs, and excessive blank lines from text.
Case & FormattingWord Counter
Count the words in any text, including Chinese and Japanese, with characters and unique words.
Analysis & CountingAbout the Text Wrapper
The tool fills each line with as many words as fit and starts a new line when the next word would pass the width, which is how the word wrap of a text editor works. The quick brown fox jumps over the lazy dog, wrapped at 20 characters, becomes three lines: The quick brown fox, jumps over the lazy and dog. In reflow mode, the lines aa bb, cc dd and ee in one paragraph are joined and filled again at a width of 8, giving aa bb cc and dd ee. A blank line ends a paragraph, so paragraphs are never merged. A line that starts with spaces or tabs keeps that indent on every line it wraps into, and the prefix counts toward the width, so a width of 20 with the prefix > leaves 18 characters for the text. A word longer than the width is left on a line of its own, which makes that line too long, unless you choose to cut it. Length is counted in characters and an emoji counts as one, which is not always the width a font draws. RFC 5322, the standard for email messages, says that each line must be no more than 998 characters and should be no more than 78, excluding the line break, which is why 78 is a common width for plain text email. Terminals and many code style guides use 80.
What is the difference between wrap and reflow?▾
Wrap breaks only the lines that are longer than the width and leaves the others as they are. Reflow first joins the lines of each paragraph and then fills them again, so lines that were broken in the wrong places are rebuilt.
What width should I use?▾
It depends on where the text goes. RFC 5322 says a line of an email message should be no more than 78 characters, and 80 is the classic terminal width. Use the width your editor, style guide or mail client expects.
How do I join wrapped lines back into one line?▾
Choose Unwrap to one line. Each paragraph becomes a single line, and a blank line is kept between paragraphs. To remove every line break, including those between paragraphs, use the Remove Line Breaks tool.
Can I add a prefix such as > to every line?▾
Yes. Type it in the prefix box and every line starts with it, including the lines that the wrap creates. The prefix counts toward the width, and a blank line gets the prefix without its trailing space.
Is my text uploaded?▾
No. The text is wrapped in your browser and nothing you paste is sent anywhere.