EthicalFusion

Word Wrap / Line Break Tool

Wrap long text to a fixed line width without breaking words — great for emails, code comments and plain text.

Was this tool helpful?

Thanks for the feedback!

This tool breaks long lines of plain text so that none is wider than the character limit you set, moving whole words down to the next line instead of cutting them in half. It is meant for text that will be read in a fixed-width setting: plain-text emails, Git commit messages, code comments, README files and terminal output.

How the line breaking works

Paste your text, type a number into Line width (characters) and press Wrap text. If you leave the width blank, 80 is used. The tool then works through each line greedily: it keeps adding words while the line stays within the limit, and as soon as the next word would push it past, that word starts a new line. The width counts every character, including spaces and punctuation.

A few details decide what the output looks like:

  • Existing line breaks are kept. Each line you paste is wrapped on its own, and blank lines between paragraphs stay where they were.
  • Short lines are never joined. The tool only splits lines that are too long; it does not re-flow a paragraph that already contains hard breaks.
  • Only spaces are break points. Hyphenated compounds such as state-of-the-art and tab-separated text stay intact.
  • Over-long words are left alone. A URL or file path longer than the width goes on a line by itself and is allowed to exceed the limit.

Example: wrapping an email sentence at 40 characters

Input, pasted as a single line, with the width set to 40:

Please find attached the revised quotation for the office furniture order, including GST and delivery charges.

Output:

Please find attached the revised
quotation for the office furniture
order, including GST and delivery
charges.

The first line stops at 32 characters because adding a space and "quotation" would take it to 42. The second line is 34 characters and the third is 33, all inside the limit, and no word has been split.

Widths used in practice

WidthWhere it comes from
72Common convention for Git commit bodies; also PEP 8's limit for Python comments and docstrings
78RFC 5322's recommended maximum line length in email
79PEP 8's limit for lines of Python code
80The classic terminal and text-console width

RFC 5322 also sets a hard ceiling of 998 characters per line, which is one reason very long unwrapped lines sometimes get mangled by older mail systems.

Tips and gotchas

  • To re-flow text that already has line breaks, remove them first with the line break remover, then wrap the single long line here.
  • The width is measured in characters, not pixels. In a monospaced font every line fits exactly; in a proportional font such as Arial the right edge will still look ragged.
  • Emoji usually count as two characters in the underlying string, so a line containing them may break a little earlier than you expect.
  • Doubled spaces are preserved as typed. Tidy them up beforehand if you want clean output.
  • Use a whole number for the width. A value below 1 is treated as 1, which puts every word on its own line.

Wrapping runs entirely in your browser, so the text is not sent anywhere.

Frequently asked questions

What line width should I use for a plain-text email?
Anything from 72 to 78 characters is safe. RFC 5322 recommends keeping email lines to 78 characters or fewer.
Why is one line in my output longer than the width I entered?
That line holds a single word, often a URL, that is longer than the limit by itself. The tool never splits a word, so it leaves it on its own line.
Can this tool join lines that are already broken into a paragraph?
No, it only splits lines that are too long and keeps every existing break. Remove the old breaks first, then wrap the text again.
Does it hyphenate long words?
No. Breaks happen only at spaces, and no hyphens are inserted.
Do spaces count toward the line width?
Yes. Every character on the line, including spaces and punctuation, counts toward the limit.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.