pdfblah.com

← All guides

How to find and replace text in a PDF

PDFs are not like Word documents. The text is baked into the page, so a plain "find and replace" is harder than it sounds. Here is how to do it properly, so the old text is really gone and the file still looks right.

Why it is tricky

Many free tools "edit" a PDF by drawing a white box over the old text and painting new text on top. That looks fine at a glance, but the original text is still underneath. Anyone can select it, copy it, or search for it, and most of these tools also stamp a watermark on your file. If you are changing a name, a date, or an amount, a cover up is not good enough.

The right way: rewrite the real text

The clean approach is to rewrite the actual text in the PDF's content stream. The old value is removed, not hidden, so Ctrl+F and copy show only the new text. The rest of the page, the fonts, and the file's metadata (dates, author) stay exactly as they were.

Step by step

  1. Open pdfblah.com and drop in your PDF.
  2. + Add step → Replace. Type the text to find and its replacement. Add more steps for more changes.
  3. Pick the scope. Replace the first match, every match, or the Nth match. You can also ignore case or match whole words only.
  4. Preview for free. You see exactly which replacements landed, on a watermarked preview, before you download anything.
  5. Download. Get the clean PDF. It's free while we're testing (paid downloads are priced by compute, from $0.40), and the file is deleted within 24 hours.

Try it now

Upload a PDF and see the change. Free while we're testing.

Find and replace in a PDF

What will not work

Scanned PDFs (a photo or scan of a page with no real text layer) cannot be edited this way, because there is no text to find. Those need OCR first. Also, if a PDF uses an unusual embedded font that cannot be reproduced, a good tool will refuse the change rather than render it wrong. pdfblah tells you clearly and does not charge for a file it cannot edit.

Three ways to run this

Same engine, same result. Pick one:

pipx install pdfblah
pdfblah in.pdf out.pdf --find "Old Name" --replace "New Name" --scope all

The local app and CLI are open source and free. See the pdfblah project on GitHub or the guide to running it locally.

More than find and replace

The same tool can redact text (remove it for real and draw a bar), remove text entirely, scrub or anonymize personal data, and read or edit the file's metadata. Each is a one-line rule or a single click, and your fonts, spacing, and alignment stay perfect either way.