My Tool Studio
Text Tools·4 min read

Add Line Breaks to Text: Wrap, Split and Space Out

Most text tools remove line breaks. This one adds them, and the need comes up more often than you would think. A plain-text email should wrap at a readable width. A long list pasted as one line needs splitting after each comma. A script or subtitle file wants one sentence per line. A block of text pasted into a CMS needs blank lines between paragraphs before it will render as paragraphs. Each of these is a rule about where a break goes, and the Add Line Breaks tool applies the rule to the whole text at once. This guide covers each mode, the widths people commonly use, and what to watch out for.

Real line breaks versus word wrap

Display is not content.

Word wrap in an editor or a browser only changes how text is displayed. Resize the window and the lines reflow, because no line break characters exist in the text. Paste that text into a terminal, a plain-text email or a fixed-width file and it arrives as one long line.

Adding line breaks inserts actual newline characters, so the shape travels with the text. That is what you want for commit messages, code comments, plain-text emails and any file read by a program that works line by line. It is not what you want for text headed into a word processor or a responsive web page, where hard breaks fight the layout.

Wrapping at a set width

Greedy, word by word.

Choose Wrap lines at a set width and set Max characters per line, or click one of the presets. The tool fills each line with as many whole words as fit, then starts a new one, the same greedy method used by the fold -s and fmt commands. Existing line breaks are kept, so each paragraph is wrapped on its own, and indentation at the start of a line is carried onto its first wrapped line.

A word longer than the width, such as a long URL, gets a line to itself by default. Tick Cut words longer than the width if the limit is strict, for example a fixed-width field in a legacy system.

  • 72 characters: a common width for git commit message bodies.
  • 72 to 78 characters: common for plain-text email.
  • 80 or 100 characters: common line length limits for code and comments.
  • 40 to 60 characters: short lines for subtitles or mobile-friendly text blocks.

One sentence per line

Useful for scripts, subtitles and diffs.

New line after each sentence adds a break after a period, question mark, exclamation mark or ellipsis that is followed by a space, including when a closing quote or bracket comes first. Writers use it to review sentence length, voice actors use it for scripts, and people who keep documents in version control use it so that a diff shows which sentence changed rather than which paragraph.

Abbreviations are the known weak spot. e.g., Dr. and U.S. followed by a space look like sentence ends, so they get a break too. Scan the result, or tick Add a blank line between parts to make each sentence easy to spot while you check.

Breaking after a comma or any text

Turn one line into a list.

New line after a character or text puts a break after every occurrence of what you type. A comma turns red, green, blue into a column, and the space after each comma is dropped so no line starts with a space. Untick Keep the character or text to remove the commas as well. Longer text works too: after </li> splits minified HTML list items, and after a semicolon splits a line of CSS declarations.

New line before a character or text is the mirror image. It suits text where each item begins with the same label, such as Step 1 ... Step 2 ..., or a list where each entry starts with a date.

Every few words, and paragraph breaks

Two more layouts.

New line every few words splits text into lines of a fixed number of words, set in Words per line. It is handy for short captions, flash cards and practice sheets where each line should be the same size in words rather than characters.

Turn line breaks into paragraph breaks replaces every line break with a blank line and never doubles existing blank lines. Markdown, WordPress and many forms need a blank line to start a new paragraph, so text pasted from a chat or a plain-text file often renders as one block until this is done.

Mistakes to avoid when adding breaks

Check before you paste.

A few habits prevent most problems:

  • Wrapping text that will be reflowed anyway, such as body copy for a web page. Hard breaks there create ragged lines on small screens.
  • Wrapping code without checking the language. Breaking a line inside a string or a URL can change what the code does.
  • Trimming indented text. Trim spaces at the start and end of each line is on by default and removes indentation; untick it for code.
  • Forgetting that the Remove Line Breaks tool is the undo. If a wrapped text needs to flow again, join it back there, with Keep paragraph breaks ticked so the blank lines between paragraphs survive.

Try it now

Open Add Line Breaks

The tool is one click away. No sign up, no upload, no payment.

Open Add Line Breaks