Reflowed output appears here
Paste text and click Reflow// reflow text cleanly at any character width
Reflow and wrap text cleanly at any character width. Perfect for README files, code comments, docstrings, terminal output, and documentation.
Reflowed output appears here
Paste text and click ReflowPaste a paragraph, README block, code comment, or docstring into the input area.
Choose 72, 80, 100, 120 from the presets, or enter any width between 20 and 500 characters.
The tool re-wraps your text at the chosen width, preserving comment prefixes and blank lines. Copy or download the result.
The Line Wrap Tool reflowing text by joining all words in a paragraph and re-breaking lines at your specified column width. It auto-detects comment prefixes like //, #, and * so your comment blocks stay properly formatted after reflowing.
Soft wrap breaks lines at word boundaries so no word is split. Hard wrap breaks at the exact character count even if it cuts a word mid-way. Soft wrap is recommended for prose and comments; hard wrap is useful when you need an exact byte-per-line guarantee.
Yes. The tool auto-detects comment prefixes on the first line of each paragraph โ including //, #, and * โ strips them before reflowing, and re-adds them to every wrapped line. You can also override with a custom prefix.
The 80-character convention dates back to punch cards and early terminals. It remains a common style-guide default in Python (PEP 8), C, and many open-source projects because it allows side-by-side diff views in most editors. 100 and 120 are common modern alternatives.
The tool operates paragraph-by-paragraph. If your paragraphs contain indented code blocks, it will reflow them. For formatted code, use only on plain prose comment blocks โ not on syntax-sensitive source lines. A dedicated code formatter like Prettier is better for structured code.
When toggled on, empty lines between paragraphs are kept in the output, maintaining paragraph separation. When toggled off, the output becomes a single continuous block of reflowed text with no blank line separators.
The processing happens via a lightweight PHP call on our own server for consistency โ no data is stored, logged, or shared. Nothing is saved after you close the page. We do not use third-party analytics that capture your input content.
A line wrap tool โ also called a text reflow tool โ takes one or more paragraphs of text and re-breaks their lines at a specified column width. Instead of a long single line or awkwardly wrapped text inherited from copy-paste, the output has clean, uniform line lengths ideal for documentation, code comments, and terminal display.
๐ก Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and assets โ worth checking out.
Every style guide and language community has an opinion on line length, and for good reason. Lines that are too long strain horizontal eye movement; lines too short fragment ideas awkwardly. Here are the most common conventions:
The most common use case for a line wrap tool among developers is reformatting block comments. When you copy a long description from an issue tracker, documentation page, or another source into a source file, the pasted text rarely matches your project's comment width. Manually re-breaking each line is tedious and error-prone.
This tool handles that automatically. It detects common single-line comment prefixes โ // for C-family languages, # for Python, Ruby, and shell scripts, and * for JSDoc-style block comments โ strips them, joins the paragraph into a single flow, and re-adds the prefix to every output line at your chosen width.
For example, a // comment block that ballooned to 140 characters after editing can be pasted here and reformatted to 80 columns in one click, with all // prefixes perfectly preserved on every line.
README files and Markdown documentation often accumulate inconsistent line wrapping over time as different contributors use different editors with different settings. Some editors insert hard line breaks while others let lines flow to any width. The result can be ugly in raw form even if it renders fine in a browser.
When your project enforces a maximum line length in its editor config or CI linting rules, this tool lets you quickly reformat paragraphs to stay within bounds. Paste the paragraph, set your width, click Reflow, and paste the tidy output back into your file.
The widely cited "seven rules of a great git commit message" includes wrapping the body at 72 characters. This convention ensures that git log --oneline, git log --decorate, and various email digest formats display commit bodies cleanly without requiring horizontal scrolling.
If you write commit messages in a plain text editor rather than inside your IDE, it can be easy to let paragraphs exceed 72 chars. Paste your draft body text here with width set to 72 and get a properly wrapped commit message body in seconds.
Soft wrap (word wrap) breaks lines only at word boundaries โ spaces between words โ so no single word is ever cut in two. This is appropriate for almost all prose and comment text because broken words are harder to read and confuse spell checkers.
Hard wrap breaks at the exact character count regardless of word boundaries. This is useful in rare situations where each line must be exactly N bytes โ for example, certain legacy network protocols or fixed-width log parsers. For everyday documentation work, stick with soft wrap.
The tool splits input on double newlines (two or more consecutive blank lines), treating each block as an independent paragraph. Within each paragraph, it joins all lines into a single flat string and re-wraps it at your width. Blank lines between paragraphs can optionally be preserved so the output matches the input's paragraph structure.
This means if your input has three separate comment paragraphs separated by blank lines, the output will have the same three-paragraph structure โ each reflowed independently โ rather than one massive merged blob.
// and others without), split it into separate passes..txt file and diff it against your original to verify only whitespace changed.