Wrap text at a fixed width

Wrap long lines at a fixed width, breaking at spaces.

Input

Output

Words 28Characters 193Without spaces 161Sentences 4Lines 9Paragraphs 2Reading time < 1 min

About Wrap Text

Long lines are hard to read in terminals, plain-text emails and code reviews. This tool breaks any line longer than your chosen width at the nearest space, so each line fits, for example 72 characters for Git commit messages or 80 for a README.

Lines that are already short enough are left alone. Very long words such as URLs can stay whole or be split at the width. Wrapping happens in your browser and nothing is sent to a server.

How to use it

  1. Paste the text into the Input box.
  2. Set the Width, anywhere from 10 to 1000 characters.
  3. Turn on “Break words longer than the width” if long URLs or codes must be split too.
  4. Copy the wrapped text or download it.

Frequently asked questions

What width should I use?

72 is a common limit for Git commit bodies and plain-text email, and 80 for code and README files. Pick whatever your destination expects.

Will it re-flow a paragraph that is already wrapped?

It only splits lines that are too long, it does not join short ones. To re-flow text, run Remove line breaks with “keep paragraphs” first, then wrap.

Does wrapping change my spacing?

Lines that get wrapped have runs of spaces collapsed to single spaces at the break points. Short lines are not changed at all.

Related tools