T

Text Machine

Powerful text tools, in your browser

Add Line Breaks

Adds line breaks after a specified number of characters to format your text.

Input Text
Characters per line:

How to use Add Line Breaks

  1. 1

    Paste your text

    Enter or paste the text you want to reformat into the input area.

  2. 2

    Pick a break rule

    Choose to add a line break every X words, every X characters, or after specific characters, and enter the value that rule needs.

  3. 3

    Set the cleanup option

    Optionally enable Remove existing line breaks first so the tool starts from a clean, single-line version of your text.

  4. 4

    Generate and copy

    Click Add Line Breaks to apply the formatting, then copy the result from the output box.

How to Add Line Breaks to Text the Right Way

Three ways to break text, three different jobs

This tool inserts line breaks using one of three rules, and picking the right one is the whole game. Break every X words keeps every word intact and is best for poetry, lyrics, or captions where you want a predictable rhythm. Break every X characters enforces a hard column width and is what you want for fixed-width email, ASCII layouts, or older terminals. Break after specific characters splits on a delimiter you name, such as a period or a comma.

A quick example shows the difference. Take the line 'red, green, blue, yellow'. With the specific-character option set to a comma, you get four short lines, one color per line plus its trailing comma. With break-every-2-words, you instead get 'red, green,' then 'blue, yellow,' regardless of where the commas fall.

Wrapping versus hard line breaks

There is an important distinction between soft wrapping and hard breaks. When your editor or browser wraps a long line to fit the window, no actual newline character is added; resize the window and the text reflows. This tool does the opposite: it inserts real, permanent newline characters into the text itself. Those breaks survive copy and paste into a plain-text field, an email, or a code comment.

That permanence is exactly why this tool exists. If you need text that looks the same width everywhere regardless of the viewer, soft wrapping cannot help you, but baked-in line breaks will.

Character mode and word splitting

The character mode counts characters as it goes and drops a break the moment the running count reaches your limit, even if that lands in the middle of a word. Set the limit to 10 and feed it 'internationalization' and you will get the word chopped into 'internatio', then 'nalization'. This is intended behavior for true fixed-width output where every line must be an exact length.

If splitting words is unacceptable, switch to the word-based mode, which only ever breaks at the gap between words. The trade-off is that lines will vary slightly in length because words vary in length, so you get readable text rather than a perfect rectangle.

Sentence-per-line with the delimiter option

One of the most useful tricks is putting every sentence on its own line. Set the specific-character field to a period and the tool adds a newline after each one, so a dense paragraph becomes a clean stack of single sentences. This is invaluable when you are diffing prose in version control, because a one-word edit then shows up as a single changed line instead of an entire reflowed paragraph.

You can chain this idea: break after a semicolon to separate clauses, or after a closing bracket to put each item of a flattened list on its own row before further editing.

Clean up before you reformat

If your input already contains line breaks from a previous wrap, applying a new rule on top produces a mess of competing breaks. Turn on Remove existing line breaks first and the tool flattens everything to a single line before applying your chosen rule, so old wrapping never collides with new wrapping.

A common workflow is pasting hard-wrapped text copied from a PDF or an old email, enabling that option, and then re-wrapping at a width that suits your destination. You effectively re-flow the paragraph in two steps without ever leaving the page.

Practical width targets

Different destinations expect different widths. Plain-text email has historically wrapped near 72 to 76 characters so quoted replies do not overflow. Many code style guides cap lines at 80 or 100 characters. Git commit message bodies are conventionally wrapped at 72. If you are pasting into one of these, set character mode to the matching number and you will satisfy the convention exactly.

For human reading rather than machines, somewhere around 60 to 70 characters per line is the comfortable range typographers recommend, which keeps the eye from losing its place on long lines.

When a different tool fits better

This tool adds breaks. If your goal is the reverse, joining wrapped lines back into one paragraph, use Remove Line Breaks or Paragraphs to Single Line instead. If you want to turn single line breaks into paragraph spacing for the web, Line Breaks to Paragraphs is the right choice because it produces blank-line or HTML paragraph structure rather than arbitrary wrapping.

Think of it this way: reach for Add Line Breaks when you are imposing a shape on flowing text, and reach for the join-oriented tools when you are removing a shape that someone else imposed.

Common mistakes to avoid

The most frequent surprise is choosing character mode and then complaining that words are split; that is the mode working as designed, so switch to word mode if you need whole words. The second is forgetting to remove existing breaks, which leaves you with doubled-up wrapping. The third is setting the specific character to a letter that occurs everywhere, which shatters the text into fragments.

When in doubt, paste a short sample first, try the rule, and inspect the output before running it on a long document. The result is instant, so iterating costs nothing.

Frequently asked questions

What ways can I insert line breaks?
You can add a break every set number of words, every set number of characters, or immediately after specific characters you choose, such as a period or comma, so you can wrap text to fit almost any layout.
Can I clear the existing line breaks before adding new ones?
Yes. Turn on Remove existing line breaks first and the tool collapses your text to a single line before applying your chosen rule, which prevents old and new breaks from clashing.
Does breaking every X characters split words in half?
The character mode inserts a break once the running count reaches your limit, so it follows your exact character setting rather than always stopping at word boundaries; use the word-based mode if you need to keep whole words intact.
What can I use the 'specific character' option for?
It places a new line after each occurrence of the character or characters you enter, which is handy for putting every sentence on its own line by breaking after a period, or splitting a comma-separated list onto separate rows.
Is this tool free and private?
Yes. It is completely free with no registration, and all formatting happens in your browser, so your text is never uploaded to a server.

Related tools

Keep going with these handy tools

Remove Line Breaks

Line Breaks to Paragraphs Converter

Remove Blank Lines

Remove Duplicate Lines

Sort List Alphabetically

Alphabetical Order Sorter