Skip to content

How do I black out a number in a screenshot or PDF on a Mac?

Redact a screenshot or PDF on a Mac

Updated Tested on macOS 26.6.2. Not yet tested on macOS 27.

For a PDF, use Preview’s Redaction Selection tool, which Apple’s macOS 26 guide says removes the text “permanently”. For a PNG or JPG screenshot, draw a filled shape over the number and save, and Preview flattens it into the image. A black box drawn over text in a PDF only hides it, and the text stays underneath.

You’re about to send a screenshot of a bank page, or a PDF with an account number on it, and one number has to go first. On a Mac, how you black it out depends on the file. A PDF needs Preview’s Redact tool. A PNG or JPG screenshot needs a filled shape, saved into the image. And a black box drawn over the text of a PDF, the obvious fix, leaves the number in the file for anyone who looks.

This guide covers each of those, and how to check the result. Preview’s steps come from Apple’s Preview guides for macOS Tahoe 26 and the sources listed at the end, not from a run for this page. DejaShot is one of the options, and it’s ours, so weigh that section accordingly.

Why isn’t a black box enough in a PDF?

Because in a PDF, a shape is a layer laid over the page, not a change to the page. When you draw a filled rectangle over a line in Preview, the rectangle is saved as an annotation, and the words under it stay where they were, in the PDF’s text layer. Howard Oakley of The Eclectic Light Company puts it plainly: “All annotations are metadata added to the underlying document.” He adds that “PDF source is notorious for retaining old content that’s no longer visible in the rendered document.”

So the number looks gone, but the text is still there. Anyone who gets the file can search for it, drag across it and copy it, or click the box and delete it. Apple’s own guide treats annotations in a PDF as things you can edit until you flatten them, which is what the section on Save as PDF below is about.

A screenshot is different. A PNG or JPG has no text layer, only pixels, so once a shape is saved into the image, there is nothing left underneath to copy.

How do you redact text in a PDF with Preview?

Use the Redaction Selection tool. Apple’s Preview guide for macOS Tahoe 26 describes it in its list of markup tools: “Select text to permanently remove it from view.”

  1. Make a copy of the PDF and open the copy in Preview, so the original stays as it was.
  2. If the Markup toolbar isn’t showing, click the Show Markup Toolbar button.
  3. Click Redaction Selection, then select the text to remove. Take in a little more than the words.
  4. Save the PDF, then close it.

Apple adds: “You can change the redaction as you edit, but once you close the document, the redaction becomes permanent.” So the redaction is only final once the document is closed. Until then, it can still be changed.

The wording has moved since. The current version of the same Apple page, which lists macOS 27 first, drops “permanently” and says only “Select text to remove it from view.” It keeps the sentence about closing the document, and adds a note: “If the PDF has a table of contents, entries in it that link to redacted text aren’t removed.” This guide follows the macOS 26 wording, the version it was checked against. It hasn’t been checked on macOS 27.

The one independent test we know of is older. In December 2020, on macOS Big Sur, Oakley found that after saving, the file “does appear to have been fully redacted apart from a few fragments of letters at the right edge”. Text that ran off the edge of the page, where you couldn’t see it to select it, wasn’t removed. Hence the advice to select a little wider than the words, and to check the result as below.

How do you redact a screenshot, PNG or JPG?

Preview has no Redaction Selection tool for images. Apple’s guide to annotating an image doesn’t mention redaction at all. What works is a filled shape, saved into the image:

  1. Make a copy of the screenshot, and open the copy in Preview.
  2. If the Markup toolbar isn’t showing, click the Show Markup Toolbar button.
  3. Click the Shapes button and choose a rectangle. Apple says: “Click a shape, then drag it where you want.” Drag it over the number, a little wider than the digits.
  4. Use Fill Color, which Apple describes as the tool to “Change the color that’s used inside a shape”, and pick solid black. A border alone, or a highlight you can see through, isn’t enough.
  5. Save the image.

Saving is what makes it stick. Apple’s guide says: “If you annotate an image file, you can’t edit, move, or delete the annotations after you save the image.” The shape becomes part of the picture, and the pixels it covers are replaced. That’s also why the copy matters: once it’s saved, you can’t take the box off to fix a mistake.

If the number sits at an edge of the screenshot, cropping it out does the same job.

How do you flatten a PDF’s annotations?

With Print. Apple’s Preview guide says: “To save a PDF and flatten annotations (so that they can’t be edited), choose File › Print, then select Save as PDF.” After that, the shapes, notes and signatures you added are part of the page, so no one can click one and move it or delete it.

Note what Apple promises there: that the annotations can’t be edited. It doesn’t say that flattening removes the text under a shape. For a number in a PDF’s text, use Redaction Selection first, then flatten if you also want the rest of your markup fixed in place.

How do you check that the number is really gone?

Open the copy you redacted, not the original, and try to get the number back:

  • Search for it. In Preview, press ⌘F and type the number, or a word that was next to it. Apple’s guide to finding text says the search finds the exact phrase you type. If it finds the number, it’s still in the file.
  • Copy it. Drag across where the number was, copy, and paste into TextEdit. Anything that pastes is still there.
  • Look at the edges. Zoom in on the redacted area, at the right edge especially, for any part of a letter left showing.
  • For a screenshot, hold the pointer over the box and try to select text. Live Text in Preview, Apple says, lets you select the text in an image. On a saved, filled shape there should be none to select.

Then share only the copy you checked. A file you sent or synced earlier still has the number in it.

Can an app find the numbers for you?

The steps above work when you know which file shows the number. If you don’t, an app can look. Some capture tools work on each new screenshot as you take it, and Xnapper’s automatic redaction is on the capture-tools page, with the other capture tools. For the files you already have, DejaShot looks through your folders, as below.

What does DejaShot’s Make Redacted Copy do?

DejaShot reads the screenshots, photos, PDFs, documents, spreadsheets and presentations in the folders you choose, on your Mac. Its Exposure Scan lists each saved item that shows a secret, in six groups: card numbers, bank accounts, ID and passport numbers, passwords, API keys and seed phrases.

Each group has limits, in plain words:

  • Passwords means a labelled password, a line like “Password: …”. That label is what it looks for.
  • Numbers are checked, not just matched by shape: card and IBAN checksums, passport check digits, valid seed-phrase words. So ordinary numbers aren’t flagged.
  • Search results mask every secret the scan found, so “••••4242” is what a search shows, never the whole card number.

For each saved item it flags, you can Quick Look it, Make Redacted Copy, Move to Trash or Ignore. A redacted copy is made only for images and PDFs. It’s saved beside the original with every secret blacked out on every page, named like “Invoice (Redacted).pdf”, and the original stays as it is. A redacted PDF is made of page images, so the hidden text is truly gone, and the copy’s words can’t be selected as text. Documents, spreadsheets and presentations can only be moved to the Trash or ignored.

It looks for those six groups only. A name, an address or a face on a page isn’t one of them, so black those out yourself with the steps above. Everything stays on your Mac, with no account. It needs macOS 14 or later, on Apple silicon or Intel, and you pay once. The details are on the pricing page.

Which way should you use?

WayWorks onIs the text gone?Needs
Preview’s Redaction SelectionText in a PDFYes, once saved and closed, says Apple. Check itBuilt in
A filled shape, then savePNG and JPGYes, the shape is saved into the pixelsBuilt in
File › Print › Save as PDFA PDF’s annotationsApple says only that they can’t be editedBuilt in
A black box over PDF textNothing on its ownNo, the text stays underneath
DejaShot’s Make Redacted CopyImages and PDFs it flagsYes, the copy is made of page imagesOne-time, see pricing

The short version. For a PDF, Redaction Selection, then save, close and search the copy. For a screenshot, a solid filled shape, then save. Never trust a black box over the text of a PDF. To find which of your files show a card number in the first place, DejaShot flags them and makes the redacted copy.

Frequently asked questions

Does a black box hide text in a PDF?

It hides the words from view, not from the file. A shape drawn over text in a PDF is an annotation laid on the page, so the text is still there to select, copy or search. Use Preview’s Redaction Selection tool instead, then search the copy to check.

Can a redaction in Preview be undone?

Only while the PDF is open. Apple says you can change a redaction as you edit, but once you close the document, the redaction becomes permanent. Redact a copy, so the original stays as it was.

Can DejaShot redact a Word document or a spreadsheet?

No. DejaShot makes a redacted copy only for images and PDFs. Documents, spreadsheets and presentations it flags can only be moved to the Trash or ignored, so delete the number in the app that made the file instead.

Where should you go next?

To find a screenshot, PDF or photo by a word inside it, start with searching inside screenshots, PDFs and photos on a Mac. For a scan, searching scanned PDFs on a Mac explains why a scan has no text layer, and how to add one. To find which of your screenshots show a password or card number in the first place, see finding screenshots that show passwords or card numbers.