Add Line Breaks

Turn a block of text into separate lines by adding line breaks where you want them.

Add Line Breaks

This tool adds line breaks to your text in three ways:
after a word or character, every set number of characters, or by adding one or more blank lines between existing lines.
Paste or type your text in the "Input" field, pick a mode & options, and press the "Add Line Breaks" button to get the result in the "Output" field.


Load an example

Mode
Add a line break around a letter, word, or regex pattern.
Break the text every N characters.
Insert blank lines after every existing line break.
Options
Turn on Case-insensitive to match "c" and "C" alike, or Regex for patterns like (?=\d).
Ready to add line breaks.


Overview

The "Add Line Breaks" tool is a free utility that turns a single block of text into several lines by inserting new lines where you choose. You can add a line break after (or before, or instead of) a letter, word, or pattern; every set number of characters; or simply add one or more blank lines between lines that already exist.

The original input is always kept safe in the "Input" field, while the line-broken result is written to the "Output" field - ready to copy, download, or paste wherever you need it. The tool is free, needs no account, and runs entirely in your browser.


How to Use This Tool

1. Add your text: Paste or type it into the "Input" field, click "Upload a file" to load a text file, or use "Load an example" to try a sample.

2. Choose a mode: Pick Text occurrence (the default), Character position, or Add blank lines, and set the value or option for the mode you chose (including how many blank lines to add).

3. Add the line breaks: Click the "Add Line Breaks" button. The result appears in the "Output" field with a message showing how many line breaks were added. Copy or download the result, and use "Clear & Reset" to start over.


Examples

Every example below loads its own text and options - click "Try it" to see the result in the "Output" field right away.

1. Add a line after each occurrence of a letter

Add a new line after every occurrence of the letter "C" in the text.

Input
ABCABCABC
Output
ABC
ABC
ABC

2. Add a line every 20 characters

Break the text into lines of about 20 characters each (words may be split).

Input
The quick brown fox jumps over the lazy dog.
Output
The quick brown fox
jumps over the lazy
dog.

3. Add blank lines between lines

Add one or more blank lines after every existing line break (the default is 1 - change the number to add more).

Input
Apple
Banana
Cherry
Output
Apple

Banana

Cherry

Features & Options

Input & Output: The "Input" textarea is where you type, paste or upload your text. The line-broken result is shown in the "Output" textarea, ready to copy or download.

Text occurrence: Adds a line break around every match of the text you type. For example, adding a break after each "C" in "ABCabcABC" (with Case-insensitive on) produces three lines:

ABC
abc
ABC

Before / Instead of / After: Choose where the new line goes. "Before" puts it in front of each match, "After" puts it behind, and "Instead of" swaps each match for a line break (the last match at the very end of the text is simply removed to avoid a trailing blank line). So replacing "C" with line breaks in "ABCABCABC" gives:

AB
AB
AB

Case-insensitive: When on, "c" also matches "C" (and vice versa). Useful for mixed-case text.

Regex: When on, the "This text" box is treated as a regular expression. For example, the pattern (?=\d) (a lookahead for a digit) adds a line break before every number. An invalid pattern shows a friendly error instead of breaking your text.

Character position: Breaks the text into lines of exactly the given number of characters; the last line may be shorter. For example, breaking "watermelon" every 4 characters produces:

wate
rmel
on

Don't split words: When on, the break moves to the next space so words are never cut in half. Breaking "the quick brown fox" every 10 characters with this switch on produces:

the quick
brown fox

Add blank lines: Adds the number of blank lines you choose after every existing line break. The default is 1, so "Apple⏎Banana⏎Cherry" becomes "Apple⏎⏎Banana⏎⏎Cherry". Set it to 2 to insert two blank lines, and so on.

Load an example: Loads a sample text into the "Input" field (using the default Text occurrence mode, with Case-insensitive on) so you can test the tool instantly.

Upload a file: Reads a text file from your device into the "Input" field - handy for breaking saved files.

Copy & Download: "Copy" puts the output on your clipboard for pasting elsewhere; "Download" saves it as a text file.

Add Line Breaks button: The central action - it processes the input text using the selected mode and options and writes the result to the "Output" field.

Clear & Reset: Clears both textareas and resets the tool to its initial state.


When to Use This Tool?

✔ Turn a single long line of words, numbers or IDs into a vertical column - add a line after each space or comma.

✔ Re-format pasted prose into fixed-width lines (e.g. 80 characters) for code comments, terminals, or plain-text emails.

✔ Double-space (or add more spacing to) a list or stanza by adding blank lines between every existing line.

✔ Split a log or record stream into lines after a recurring marker, character, or pattern.


FAQs

FAQ 1: What can I add line breaks by?
Answer: Three ways. "Text occurrence" adds a line break before, after, or instead of a letter, word, or regex pattern. "Character position" adds one every set number of characters. "Add blank lines" adds one or more blank lines after every existing line break.

FAQ 2: Does the tool change my original text?
Answer: No. The "Input" field is never modified; only the copy in the "Output" field reflects the line breaks you added.

FAQ 3: Why does my output have empty lines between chunks?
Answer: With "Add blank lines" a blank line is added after each existing break, so a text that already had line breaks gains a blank line between them (or more, if you set a higher number). With "Text occurrence" set to "instead of", the matched character is replaced by a line break.

FAQ 4: Can I keep whole words intact in Character position mode?
Answer: Yes - turn on "Don't split words". The break then moves to the next space after the character limit, so words are never cut in half.

FAQ 5: Is my text private?
Answer: Yes. The tool runs entirely in your browser with JavaScript. Your text is never uploaded to or stored on our servers.

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.