Split by Text

Break one PDF into separate documents at every page that carries the text you name.

Runs on your devicePDFWorkingNo account needed

What this tool does

Split by Text looks at what is printed on each page rather than where the page sits. pdf.js walks the document once and pulls the text out of every page, reconstructing lines from the position of the glyphs; each page's text is then tested against the phrase you typed. The pages that match become the cut points, and pdf-lib copies each resulting run of pages into a document of its own. Nothing is re-rendered, so the parts keep their selectable text and their images at full resolution.

Where the cut falls is yours to choose. Before each matching page makes the match the opening page of a part, which is the shape of an invoice run or a report whose chapters each begin with a heading — and anything sitting ahead of the first match is not thrown away, it becomes a leading part of its own. After each matching page does the opposite and closes a part on the match, which is what a delimiter page belongs to when the marker trails the document it ends. Matching is a plain substring and ignores case until you tick Match case; Treat it as a regular expression turns the box into a pattern instead, and one that will not compile stops the run with the engine's own message rather than quietly matching nothing.

Whether the tool fits your file comes down to two constraints. The first is that only real text is searchable: the page is read through its text layer, so a scan that is a photograph of paper carries no characters to match, however legible the words are on screen — put it through PDF OCR first and split the searchable copy. The second is that a page is the smallest unit it can cut, so two invoices printed on one sheet stay together, and the match says which page opens or closes a document, never where on the page. Beyond those, each part is a document built from scratch: page content is copied across, but the outline does not survive and a link aimed at a page that landed in another part stops resolving.

How to use it

  1. Add the PDF. One document per run. Drop in several and each one is split on its own with the same phrase and the same settings.
  2. Type the text that starts a new document. Invoice is the default. Case is ignored unless you tick Match case, and Treat it as a regular expression swaps the plain search for a pattern.
  3. Choose where the cut falls. Before each matching page when the phrase opens a document; after each matching page when it closes one, as a trailing separator sheet does.
  4. Say how the parts should be named. Name each part after the matched line reads the first matching line on the page a part opens with, so it does its work on a before split. Untick it — or split after each match, where it has nothing to read — and each part is named for the page range it holds.
  5. Save the parts. Every part is listed with its size and can be saved singly, or taken together with Download all as ZIP.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Bursting a run of invoices

A month billed to one long PDF divides at every page whose header repeats the word Invoice, so an invoice split leaves one file per customer instead of one file per month.

Unpicking a batch scan

Feed a stack with a marker sheet between documents, split after each match, and the pile comes back as separate files with the marker closing the part it ends.

Cutting a report that has no outline

When bookmarks were never written but each chapter opens with the word Chapter, matching that word does the job Split by Bookmark has nothing to work from.

Separating pooled statements

An export that repeats an account heading at the start of each statement becomes one document per account, ready to file or send on.

Questions

Where does the splitting happen?
In this browser tab. pdf.js reads the page text and pdf-lib assembles the parts, both on your own machine, so the document is not transmitted and there is no copy elsewhere to clear up afterwards.
Why does it find nothing in my scanned file?
Because there is nothing to find. Matching runs against the PDF's text layer, and a scan without one is a picture of words rather than words. Run PDF OCR over it first, then split the searchable file it hands back.
Can it split at a barcode?
Only when the value is printed as characters too. A barcode is artwork and nothing here decodes it, so a barcode split works when the separator sheet also spells the code out in text, or after OCR has recognised that line.
Why do some parts share a file name?
Name each part after the matched line uses the first line containing your text, and when that line is identical on every match — a bare heading reading INVOICE, say — every part inherits it. Untick the option and the parts are named for their page ranges, which are always distinct. Characters a file name cannot hold are replaced with spaces and the label is cut at 60. The ZIP numbers any repeats, but saving them one at a time leaves it to your browser.
Why is the matched line ignored when I split after a match?
Because the label is taken from the page a part opens on, and an after split opens every part on the page following a match — a page that did not match, and so carries no line to lend. The checkbox stays ticked and changes nothing there: those parts come out named for their page ranges. Splitting before each match is the arrangement in which the option actually names anything.
What happens to bookmarks and internal links?
They go. A part is a new document holding copied pages, so it starts with no outline, and a cross-reference whose target ended up in a different part has nothing to point at. The pages themselves arrive complete, annotations included.
How large a file will it take?
No limit is imposed, but the whole document is held in memory twice while it works — once for the text pass and once for the copy that writes the parts — and every page is read before the first part is built. A large scan on a phone is the case that runs out of room first.
Can it open a password-protected PDF?
No, and the refusal is wider than the question: any encrypted document is turned away, including one whose owner password only locks printing or copying and which opens in a reader without prompting anybody. You get a message rather than a half-processed file. Take the encryption off with Unlock PDF, using the password you already hold, then split what comes back.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.