How to use the hard wrap text tool
- Type or paste your text into the first box.
- Set the characters per line, from 10 to 200.
- Choose Reflow paragraphs to join the lines of each paragraph before wrapping, or Keep my lines to wrap each line you typed on its own. Tick the split option to cut words longer than a line.
- Read the wrapped text in the result box and Copy wrapped text or Download file.
How the wrapping works
The tool fills each line with as many whole words as fit, then starts a new line. Runs of spaces become single spaces. In the example at 40 characters, the first paragraph wraps to four lines of 39 characters or fewer, followed by a blank line and the second paragraph. The summary reports the number of lines and the longest line.
A word longer than the width stays whole by default, so the line is longer than the limit and the page tells you. Tick the split option to cut it at the width instead; the rest of the word continues on the next lines.
Reflow or keep lines
In reflow mode, single line breaks inside a paragraph are treated as spaces, and blank lines mark where paragraphs end. That suits text copied from a document where lines were already broken at another width. Keep my lines wraps each line separately, so a short line stays short, which suits lists, addresses and poems.
Widths count characters, so use a fixed-width font to check the result. Accents and most symbols count as one character, but emoji and some scripts can take more room on screen than one character.
When to hard wrap
Hard line breaks matter in plain text email, code comments, README files and terminals, where the viewer does not wrap lines for you. They get in the way in word processors and web forms, which do their own wrapping, so only wrap text for a place that needs it. See also the text cleanup tool, the word counter and the tweet thread splitter.
Everything runs in your browser and nothing is uploaded. The limit is 500,000 characters.
Assumptions and limits
- The width is a whole number from 10 to 200 characters, counting Unicode code points.
- Hyphens are not treated as break points. Words break only at spaces unless you tick the split option.
- Tabs count as spaces for wrapping, and Windows line breaks are treated as ordinary line breaks.
- Nothing is uploaded or stored, and the input is limited to 500,000 characters.
Frequently asked questions
How do I wrap text at 80 characters?
Paste the text, set the characters per line to 80 and read the result. Words are never cut unless you tick the option to split long words.
What is the difference between reflow and keep my lines?
Reflow joins the lines of a paragraph before wrapping, so text breaks at the new width. Keep my lines wraps each line separately and never joins two lines together.
Why is one line longer than my width?
A single word is longer than a line and the split option is off. Tick it to cut the word at the width, or increase the width.
Does it keep my paragraphs?
Yes. A blank line stays a blank line, in both modes, and in reflow mode extra blank lines between paragraphs become one.