← Back

How to hide a card or account number in a screenshot

To hide a card, account, or reference number in a screenshot, cover the digits with a solid, fully opaque block, export a new flattened file, and check it before you share. Do not blur or pixelate the number. A card or account number is a short string of digits in a known font, which is the single easiest thing for a de-pixelation tool to rebuild, so a blurred number is not hidden, only delayed. Do the whole thing on your Mac instead of uploading the image to a web tool, and cover the number generously, because a box drawn tight to the digits leaks how many there are and where they sat.

Why a number is the easiest thing to un-hide

This is the part most guides get backwards. People reach for a blur or a pixelate on a card number because it feels proportionate to a short bit of text, when a number is the worst possible thing to blur. The tools that reverse pixelation are strongest on short, structured text set in a known font, and a card or account number is all three at once. It is a fixed run of digits, in whatever standard font the app rendered it in, drawn from only ten possible characters. That is a tiny search space compared with words.

The mechanism is public. Pixelation with a normal box filter sets each block to the average of the pixels beneath it, and that mapping is deterministic, so it can be solved. In 2020 a researcher known as spipm released Depix, which rebuilds text from a box-filter pixelation by matching candidate blocks. In 2022 Dan Petro at Bishop Fox released Unredacter, which renders each guess in the same font, re-pixelates it with the same settings, and walks the string character by character until it matches. Petro's advice was blunt: no pixelization, no blurring. If you want the longer version of what can and cannot be undone, I wrote up whether you can reverse a blurred or pixelated image. For a number, treat the answer as yes.

A card number is not sixteen random digits

Here is the detail that makes partial exposure dangerous, and it is specific to card and account numbers. A 16-digit card number is not sixteen independent secrets. The first six digits are the issuer identification number, which identifies the bank and network, and you can usually read the network straight off the logo in the same shot. The last digit is a Luhn checksum, computed from the other digits, so it is derivable rather than secret. That leaves roughly nine account digits doing the real hiding.

The Luhn check cuts both ways. It was built to catch typos, not attackers, so anyone rebuilding the number can use it to throw away invalid guesses and confirm a valid one. Every digit that stays visible, or gets reconstructed from a weak blur, removes a factor of ten from what is left to guess. This is exactly why the card industry's own rule (PCI DSS) caps what a screen may show at the first six and last four digits, and why apps display only the last four. The convention exists because the middle is the part that must actually be gone. So do not leave more than the last four showing, and hide the rest with something that does not come back.

Which methods are safe for a number

Only two approaches genuinely hide a number: a solid, fully opaque fill flattened into a fresh file, or a tool that destroys the pixels underneath. Everything else on this list can be undone, and the short digit string makes each failure worse than it would be for a paragraph of prose.

MethodSafe for a number?Why
BlurNoA low-radius blur can be estimated back, and a run of digits in a known font is a small space to search.
Pixelate or mosaicNoEach block is the average of the pixels beneath it, a fixed mapping Depix and Unredacter walk digit by digit.
Marker or highlighterNoInk below full opacity leaves the digits readable when you push brightness and contrast.
Black box on a separate layerNoThe shape sits over intact digits. Select and copy them out, or delete the layer.
A box sized tight to the digitsLength leaksEven a perfect cover reveals how many digits it hides and where they sat, which narrows a structured number further.
Crop, then save over the originalSometimes notThe old bytes can survive past the end of the smaller file, so the number comes back out (aCropalypse, 2023).
Opaque fill, exported as a new fileYesThe pixels are painted over and nothing sits on a removable layer.
A content-independent scrambleYesBlocks are sampled from across the region, so the pattern holds no relationship to the digits underneath.

The safe way to hide a number on a Mac

You can do this in Preview, with care. This is the same manual method behind how to redact a screenshot on a Mac, tuned to a number.

  1. Open the screenshot in Preview and show the Markup toolbar.
  2. Choose the rectangle shape. Preview has no blur or pixelate tool, which is fine, because you should not use one on a number anyway.
  3. Set its fill to solid black and its opacity to 100 percent, and cover the full number, including the gaps between the four-digit groups. Leave at most the last four digits showing if you actually need them.
  4. Flatten it. Go to File, then Export, and save a fresh PNG. Do not save over the original. Exporting a new file bakes the block into the pixels and drops the editable shape.
  5. Strip metadata if the shot is a photo of a physical card, since a camera image can carry location data.

Cover generously, and mind the length

A bar traced tightly around the digits still tells anyone how many there are and exactly where they sat, and for a structured number that is real information. Cover the whole field the number lives in, gaps and all, rather than a shape that hugs the run. If the screenshot is a payment confirmation, an order page, a booking reference, or a direct message with a number in it, black out the surrounding label too where it names the account, so the cover does not advertise what it is protecting.

Do not upload it to a web tool

Search for how to blur a card number and the first results are web tools that ask you to upload the image to their server to process it. With a live card or account number in the frame, that is the one thing worth avoiding. Every method here runs on your own machine. Preview never touches the network to draw a box and export a file, and a dedicated app can bake in a redaction locally. Keep the picture of your card on the device that already has it.

If it is a whole bank statement

This guide is about a single number on any screenshot or image. A full bank statement is a different job, because it carries more than the account number: the sort code, the balance, the address block, and a column of transactions that each leak something. I cover what to black out on one, and why, in how to redact a bank statement on a Mac.

Check that it actually worked

Hiding a number is worth verifying every single time. Open the file you are about to send, not the one you were editing. Zoom all the way in on the covered area. Push brightness and contrast to their extremes and look for ghosting of any digit. Try to select and copy text over the block, and you should get nothing. Confirm you exported a fresh, flat file. Thirty seconds here is the difference between hidden and recoverable.

How ScrubShot handles it

The manual route works, but it is fiddly and unforgiving on a number, so I built ScrubShot to make the safe path the default. Press Fn + Space and it captures the whole screen with ScreenCaptureKit and opens it in an editor, so you can capture a payment page or a card photo and clean it in one place.

The Scrub tool is the part I care about here. A normal pixelate sets each block to the average of the pixels beneath it, which is the signal Depix and Unredacter exploit, and a card number is their ideal target. ScrubShot does not do that. It uses what I think of as a content-independent scramble: each block is filled from a few pixels sampled at random from across the whole selected region, so the pattern is decoupled from the digits that sat underneath. It looks like a redaction and keeps the rough colors of the area, but there is no per-block relationship to the original number to solve for. It reverses to nothing by design, and the scrub is baked straight into the image, so the digits are gone, not hidden on a layer.

From there you can crop, add a label, undo with ⌘Z, then Copy and Save. Finished images go to a dedicated folder at ~/Pictures/ScrubShot and to the clipboard, and the saved PNG contains only the scrubbed result. The capture, scrub and share flow makes no network connections, so a screenshot with a card or account number in it never leaves your Mac. To be precise, the app talks to a server only for the free-trial check, license activation and update checks, and that request carries a hashed machine identifier and your license key, never any image data. ScrubShot runs on macOS 14 and later, on both Apple Silicon and Intel, and it needs Screen Recording and Accessibility permission to capture the screen and to see the Fn shortcut.

FAQ

How do I hide my credit card number in a screenshot?
Cover the digits with a solid, fully opaque block, then export a fresh flattened file and check it before you share. Do not blur or pixelate them. A card number is a short string of digits in a known font, which is the easiest kind of text for a de-pixelation tool to rebuild, so a blurred number is not hidden. Cover the whole number row generously and do it on your Mac, not on a web tool you upload the image to.
Is it safe to blur or pixelate a card or account number?
No, and a number is the worst case for it. Pixelated text can be reconstructed, and short structured text in a known font, like a run of digits, is exactly what the solvers do best. Bishop Fox's Unredacter (2022) and Depix (2020) walk a pixelated string character by character in the same font. Digits are only ten possible characters, so the search space is small. Blur is a weaker version of the same idea, not a safer one.
How do I block out numbers on a screenshot?
Draw a rectangle over the digits, set its fill to solid black at 100 percent opacity, and cover the full number including the gaps between groups. Then flatten the image by exporting a new file rather than saving over the original, so the block is baked into the pixels and does not sit on a removable layer. A marker or highlighter applied below full opacity can leave the digits readable when someone raises the brightness and contrast.
Should I use an online tool to hide my card number?
Better not to. Most blur-your-card web tools ask you to upload the image to their server to process it, which is the opposite of what you want with a live card in frame. Preview on your Mac can draw an opaque block and export a flattened file without the picture ever leaving the machine, and a dedicated app can bake in a redaction that does not reverse.
Does ScrubShot upload my screenshots?
No. The capture, scrub and share flow makes no network connections, so your screenshots never leave your Mac. The app contacts a server only for the trial check, license activation and update checks, and those requests carry a hashed machine identifier and your license key, never any image data.

Try it

ScrubShot is a one-time $30 purchase with a seven-day free trial, no account and no card up front. It runs entirely on your Mac.

Get ScrubShot