Wrap text at a maximum line length
Break long lines at a maximum number of characters, between words and never in the middle of a word. The text is processed in your browser and nothing is uploaded.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Example
The quick brown fox jumps over the lazy dog and keeps running far away. at a width of 30 becomes three lines: The quick brown fox jumps over, the lazy dog and keeps running and far away. The note says that 2 extra lines were made.
Typical widths
| Use | Characters per line |
|---|---|
| Git commit message body | 72 |
| Plain-text e-mail | 72 to 78 |
| Code and comments | 80 to 100 |
| Terminal output | 80 |
Options
- Maximum per line: from 5 to 1,000 characters.
- Break words that are longer than a line: on by default, so a very long URL or word does not run past the limit.
Lines that are already short are left alone, and existing line breaks are kept, so paragraphs stay as they were.
Related
For the opposite, putting a paragraph back on one line, use remove line breaks or join lines. To cut after an exact number of characters, even inside words, use split text.
Frequently asked questions
Which width should I choose?
72 characters for commit messages and plain-text e-mail, 80 for code and terminals, and 40 for narrow displays. The default is 40.
Are words ever cut in half?
Only when a single word is longer than the width, and then only if *Break words that are longer than a line* is ticked. Otherwise the long word keeps a line of its own.
Does it join short lines?
No. Lines that are already within the limit stay as they are. To join broken lines into paragraphs, use [remove line breaks](/en/text/remove-line-breaks).
How is the line length counted?
In visible characters, so an accented letter or an emoji counts as one.