← All tools

Redact PDF Text — Black Out Sensitive Data

Black out text, SSN, and sensitive data in PDF permanently. 100% secure client-side redaction, files are not saved on servers.

+Upload PDF or photoor drag & drop files here🚀 Launch Tool for Free

How It Works

01

Upload your PDF

Open the PDF document in your browser. No server upload.

02

Draw a redaction box

Draw a rectangle over any sensitive text, numbers, or personal data.

03

Save the document

Data is permanently hidden. Export your sanitized PDF file.

Why pdfredX

🔒

Full Privacy

Files never leave your browser. No upload to third-party servers.

Client-Side Processing

All computations happen locally — fast, secure and free.

🆓

No Registration

Just open your browser and start. No accounts needed.

📱

Works on All Devices

Desktop, tablet, and mobile — no installation required.

Related Articles

How to Black Out Text in PDF Online: Permanently Hide Sensitive Data
Before you send a contract, a certificate, or a scan, you need to anonymize the document — hide personal data: passport numbers, amounts, names, account numbers. A plain black rectangle drawn on top is deceptive: the original text often survives underneath it. The Redact tool in pdfredX paints over the area **and destroys the pixels beneath it** on save, so there's nothing left to recover. All in the browser, the file is never uploaded.

Before you send a contract, a certificate, or a scan, you need to anonymize the document — hide personal data: passport numbers, amounts, names, account numbers. A plain black rectangle drawn on top is deceptive: the original text often survives underneath it. The Redact tool in pdfredX paints over the area and destroys the pixels beneath it on save, so there's nothing left to recover. All in the browser, the file is never uploaded.


Step 01. Load the Document

Open pdfredX and drag a PDF or scan into the upload zone. The page is rendered to Canvas locally through PDF.js — not a single byte goes to a server. Click 🖌 on the card of the page you need to open the editor.


Step 02. Cover the Confidential Areas

Pick the ⬛ Redact tool and draw a rectangle over whatever needs hiding: a line, a field, a number, a signature. Draw as many rectangles as you need — each fills its area with a solid color. Black is the default; change it in the editor panel if you like (say, to match a form's background).

Give the box a small margin: on small type, the tails of letters can extend past the visible edge.


Step 03. Save — the Data Physically Disappears

Click 💾 Save. The key point: on save, the whole page is flattened into a single raster image — the rectangles become part of the picture, and the original pixels beneath them are replaced with the redaction color. In the exported file there is nothing under the black box: no text layer, no separate object you could move or delete.

Then click Create PDF — jsPDF assembles the final file and downloads it straight from the browser. Free, no sign-up.


How It Works Under the Hood

A redaction is a fabric.Rect with a solid fill on top of the page. While you edit, it stays a separate object. But on save, saveFab calls canvas.toDataURL({ format:'jpeg', quality, multiplier }) — the entire canvas (background + every rectangle) is flattened into one image at the original's full resolution (the multiplier is fabNativeW / fabCanvas.getWidth()).

After that step there's no going back: the result is a flat picture where, in place of the covered text, there are simply pixels of the fill color. That's exactly why redaction in pdfredX is real, not cosmetic.


Known Limitations

Check the box coverage. The tool fills exactly the area you outlined. If part of the data sticks out past the rectangle, it stays visible. Scan the page by eye before saving.

Redaction isn't word-selective. It covers a rectangular area as a whole, not "just the digits." For a clean result, trace the box along the edges of the fragment you're hiding.

The output is raster. After saving, the page becomes an image: selectable text on it (including the unredacted parts) becomes part of the picture. That's the price of guaranteed destruction of the data under the box.


If you don't want to hide data under a box but to remove an object and rebuild the background (a stamp, a logo, a smudge — with no trace of a box left), that's the Remove Object from PDF tool.

Try it now — pdfredx.com, no sign-up, your file stays with you.

The Illusion of Redaction: Why a Black Box in a PDF Often Doesn't Hide Your Data
You blacked out the passport number in a contract with a rectangle, saved it, sent it — and you're sure it's hidden. Then the recipient drags the mouse across the text under the "redaction" and copies it. Or moves the black box aside in an editor — and there's the untouched original underneath. This isn't rare, it's a routine leak. Let's look at why it happens and how to redact for real, without uploading the document to someone else's server.

You blacked out the passport number in a contract with a rectangle, saved it, sent it — and you're sure it's hidden. Then the recipient drags the mouse across the text under the "redaction" and copies it. Or moves the black box aside in an editor — and there's the untouched original underneath. This isn't rare, it's a routine leak. Let's look at why it happens and how to redact for real, without uploading the document to someone else's server.


Why Ordinary "Redaction" Doesn't Hide Data

A rectangle over the text layer. In most PDFs the text is a separate layer under the page image. Draw a black box over it as an annotation, and the text itself stays in the file. It shows up when you select it, copy it, search the document, or open it in a different viewer.

The box as a separate object. If the redaction is a vector object on top of the page, it can be selected and deleted (or moved) in any PDF editor. Underneath — the original data, perfectly intact.

Metadata and previews. Even when the picture looks "clean," the original text can linger in the file's internal data or a thumbnail cache.

The result: visually the data is hidden, technically it's still there. For a passport, a medical record, or a deal amount, that's a direct leak.


How pdfredX Redacts for Real — and Locally

pdfredX solves both problems at once: it destroys the data under the box and never sends the file to a server.

The page is raster, with no text layer. PDF.js renders the page to Canvas as an image. There is no separate text layer under the redaction — there's nothing to copy.

On save, the box is baked into the picture. saveFab flattens the canvas (background + rectangles) into a single image via toDataURL. The pixels under the box are replaced with the redaction color — the original pixels physically don't remain in the file. It's not an annotation on top that can be lifted off.

Nothing goes to a server. The file is read locally through FileReader, all processing happens in the tab's memory, and jsPDF assembles the finished PDF and hands it to the browser for download. The document you're removing sensitive data from never leaves the device.

Works offline. Open the tool, disconnect from the internet, redact and save — everything keeps working. The network is only needed to load the app once.


Step by Step, Safely

01. Load the document. Drag the PDF into the upload zone at pdfredx.com. FileReader reads the file locally — it never leaves the device.

02. Cover the data. Open 🖌 on the page, pick ⬛ Redact, outline everything confidential with rectangles.

03. Save and close. 💾 Save → Create PDF. Under the boxes are black pixels now, not hidden text. Once you close the tab, the file data is gone from memory.


What We Cannot Guarantee — An Honest Disclaimer

Redaction destroys the data under the drawn box in the exported file. But there are limits we're upfront about:

Coverage is on you. If the box didn't cover part of the data, it stays visible. Check the page by eye before saving.

Malware and browser extensions. A keylogger on the device or an extension with "read all sites" access is outside a web app's control. For especially sensitive documents, work in a private window with no third-party extensions.

The saved file is on your disk. Its security — encryption, access — is on your side.

We provide genuine destruction of the data under the box and isolation in the browser. The rest is on the user's side.


Redact confidential data for real, with no server upload — pdfredx.com, free, no registration.

Permanent Redaction in the Browser: How canvas.toDataURL Destroys the Pixels Under the Box
Real redaction differs from the cosmetic kind by one property: afterward, the original data **doesn't exist** in the file — it isn't "hidden under a layer." Implementing that in the browser, with no server and no risk of a leak, is a matter of the right architecture. Here's how the `redact` tool in pdfredX is built: why raster flattening guarantees destruction, where the line between an annotation and real redaction runs, and what this approach costs.

Real redaction differs from the cosmetic kind by one property: afterward, the original data doesn't exist in the file — it isn't "hidden under a layer." Implementing that in the browser, with no server and no risk of a leak, is a matter of the right architecture. Here's how the redact tool in pdfredX is built: why raster flattening guarantees destruction, where the line between an annotation and real redaction runs, and what this approach costs.


The Architectural Challenge: "Deleting" Data vs. "Covering" It

The naive redaction draws a black rectangle over the page. The problem is that in a PDF this is usually an annotation above the text layer: the text itself stays in the document structure. Ctrl+C, search, a parser, or a different viewer will pull it out. Real redaction has to leave neither text nor original pixels under the box.

Two paths: 1. Surgery on the PDF structure — find and cut out the text/image objects under the area at the binary-format level. Powerful, but fragile: a complex parser, a risk of breaking the document, hard in the browser. 2. Raster flattening — render the page as an image, lay the box on top, and flatten it all into a single raster. The original objects stop existing as data — what's left is a flat picture.

For a web tool where reliability and privacy matter, the second path is both simpler and safer. That's the one in pdfredX.


Implementation Breakdown

The Page as Raster — Already Half the Job

PDF.js renders the page into lowerCanvasEl (the lower Fabric.js layer) as an image. At this stage there's already no separate text layer under the future redaction: the page is pixels, not text + picture. There's nowhere to copy "hidden" text from, because the text doesn't exist as an object.

The Redaction Box — a Temporary Fabric Object

While the user edits, each covered spot is a fabric.Rect with a solid fill on top of the background:

const rect = new fabric.Rect({
  left, top, width, height,
  fill: redactColor,      // '#000000' by default
  selectable: true, evented: true,
});
fabCanvas.add(rect);

At this stage the data under the box is still "alive" — the rectangle can be moved, the background under it seen. The destruction happens on save.

Flattening: toDataURL — the Point of No Return

On save, saveFab flattens the whole canvas into one image:

const multiplier = fabNativeW / fabCanvas.getWidth();   // up to the original's full resolution
const dataUrl = fabCanvas.toDataURL({
  format: 'jpeg', quality: 0.92, multiplier
});
items[fabItemId].editUrl = dataUrl;

toDataURL rasterizes the canvas "as seen on screen": background + all rectangles are baked into a single pixel array. In place of the covered text — simply pixels of the fill color. The original pixels under the box are not in the result — there's nowhere to "bring them back" from, because the new image doesn't store what was covered. The multiplier raises the result to the page's native resolution so quality doesn't drop.

From that moment, both the text layer (which wasn't there anyway) and the separate rectangle object are gone: what remains is a flat picture. The final PDF is assembled by jsPDF, inserting that image as a page.

Why This Beats an Annotation

A vector rectangle annotation can be selected, moved, or deleted in someone else's editor — and the original appears under it. Raster flattening leaves no such option: no layers, no objects, no original pixels. There's one raster.


Tradeoffs and Limitations

Loss of the text layer. After redaction, the page is an image. Selectable text (including the unredacted parts) stops being text. That's a deliberate price: the destruction guarantee matters more than preserving the layer. Need the text layer back — run Area OCR on the relevant fragments.

File size. A raster page is usually heavier than a vector one. JPEG at quality: 0.92 is a balance between text sharpness and size; if you need to re-compress, the compression tool helps.

Coverage is the user's responsibility. The algorithm destroys exactly what's under the rectangle. Data sticking out past the box stays. A visual check before export is mandatory.

Color to match the background. Black by default, but for forms with a solid fill it's handier to pick the background color — then the redaction doesn't stand out, and the data is destroyed all the same.


If you want to be sure — load a document at pdfredx.com, redact a line, save, and try to select the text under the box in the finished PDF. No sign-up, no file uploads to any server.

🚀 Launch Tool for Free