ReplaceKit

Find and replace with a line break or paragraph break in Google Docs

Short answer: Google Docs' own Edit > Find and replace cannot put a new line into the "Replace with" box. Typing \n there inserts the two characters \n, even with "Match using regular expressions" ticked. Google says so in its help page (checked 1 November 2026, quoted in the sources below). This page shows what does work: the manual way, a round trip through a text editor, an Apps Script, and an add-on.

1. What Docs' own Find and replace can and can't do

TaskDocs' Find and replace
Find a word or phrase, match caseYes
Find with a regular expression (RE2)Yes, tick "Match using regular expressions"
Replace with a new line or paragraph break (\n)No: \n is inserted as text (Google's help: regex replacements "only work with Google Sheets")
Replace with a capture group ($1)No, same rule: inserted as text
Find text that runs across a paragraph breakNot documented by Google; each paragraph is searched on its own
Replace only inside a selectionNo, it searches the whole document

2. A few breaks: do it by hand

  1. Press Ctrl+H (Cmd+Shift+H on a Mac), type the text that should start a new line, and use Next to jump to each match.
  2. Close the box, put the cursor before the match and press Enter for a new paragraph, or Shift+Enter for a line break inside the same paragraph.

Fine for five breaks, painful for fifty.

3. Many breaks: round trip through a text editor

If the document is mostly plain text (formatting will be lost), copy it into an editor whose find and replace understands \n, such as VS Code (free) or Notepad++ (free, Windows):

  1. Select all in Docs (Ctrl+A) and copy.
  2. Paste into the editor and open Replace (Ctrl+H). Turn on regular expressions (the .* button in VS Code, "Regular expression" in Notepad++).
  3. Example: to start a new line before every "Step": find \s*(Step \d+), replace with \n$1. To put each sentence on its own line: find ([.!?]) +, replace with $1\n.
  4. Copy the result and paste it back into Docs. Each new line becomes a paragraph.

The catch: bold, links, headings, lists, images and comments do not survive the trip.

4. Keep the formatting: Apps Script

Docs' scripting tool can replace text without the copy and paste. body.replaceText() in Apps Script cannot make a new paragraph (a newline in its replacement comes out as a soft line break), but the Google Docs API's replaceAllText request can. Developer Kanshi Tanaike published a working example that turns soft line breaks into paragraph breaks this way (gist, April 2024). It needs Extensions > Apps Script, the Docs API switched on under Services, and an authorization step. Try it on a copy of your document first.

5. No code: ReplaceKit

ReplaceKit is a Google Docs add-on we are building for exactly this. In its sidebar \n means a paragraph break, \v a line break (Shift+Enter) and \t a tab, in both the Find and the Replace box. Searches can cross paragraph breaks, so you can also join lines. Replacements keep the formatting of the text they replace, and you can limit a replace to your selection, headers, footers or footnotes, with a preview of each match first. Free: all of that with no click limit. Pro ($6/month or $48/year): bulk lists of find > replace pairs and formatting replace.

To do this in ReplaceKitFindReplace with
New paragraph before every "Step 2", "Step 3"...\s*(Step \d+) (regex on)\n$1
Turn soft line breaks into paragraphs\v\n
Turn each "; " into a new line in the same paragraph; \v
Remove empty paragraphs\n\n+ (regex on)\n

Do it on pasted text: remove empty paragraphs in our free tool (runs in your browser), then paste the result into your document.

ReplaceKit is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.

You're on the list. We'll email you when ReplaceKit is ready.

The free version will have no click limit or trial clock.

More ReplaceKit guides

Sources