Word Wrap Text
Wrap long lines at a fixed number of characters.
Input
This tool runs entirely in your browser. The data you paste or load is never uploaded.
Result
Enter your input, then run the tool.
About this tool
Wraps text to a maximum line length without splitting words, keeping paragraphs and existing blank lines, with an option to break words longer than the limit. Useful for commit messages, plain-text emails and code comments.
How to use it
- Paste the text.
- Set the maximum line length and an optional prefix such as “// ” or “> ”.
- Press Wrap and copy the result.
Frequently asked questions
Which width should I use?
72 characters is the convention for Git commit bodies and plain-text email; 80 is common for code.
Is the prefix counted in the width?
Yes. The prefix is included, so every line, prefix and all, stays within the limit.
Keep going
Related tools
Remove Line Breaks
Join broken lines from PDFs and emails into clean paragraphs.
Add Line Numbers
Number every line of a text or code listing.
Remove Extra Spaces
Collapse double spaces, stray tabs and blank lines.
Word Counter
Count words, lines and paragraphs while you type.
Character Counter
Count characters with and without spaces, plus byte size.
Sentence Counter
Count sentences and average sentence length.