Free plan

Redact

Black out private text in a PDF so it is gone for good
POST
/v1/pdfs/redact

About this tool

Redaction means covering private information, such as names or numbers, so nobody can read it. This tool blacks out text you choose, found by the words you type, by built-in patterns, or by boxes you mark. The affected pages are turned into pictures, so the hidden text is truly removed and cannot be copied. This cannot be undone, so keep your original.
For example, you black out every customer name and phone number in a document before sharing it with a partner.

How to use it

  1. Choose this tool.
  2. Add your PDF.
  3. Confirm that you understand the redaction is permanent.
  4. Type the words or phrases to black out, or choose built-in patterns, or mark boxes.
  5. Press Generate, then download the redacted PDF.

What you get back

You get a new PDF where the chosen content is covered with black boxes and removed from the file. Check the pages before you share it.
GOOD TO KNOW
If nothing matches the request FAILS (400) instead of returning an unredacted document. At most 500 targets and 50 redacted pages per request.
TEST IT LIVE

Try Redact in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/redact
Tool ID
pdfs.redact
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/redact" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'permanent=true' \
  -F 'dpi=150' \
  -F 'padding=0'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.redact({
    "file": 'document.pdf',
    "permanent": true,
    "dpi": 150,
    "padding": 0
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->redact([
    'file' => 'document.pdf',
    'permanent' => true,
    'dpi' => 150,
    'padding' => 0,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Black out private text in a PDF so it is gone for good.

Redact accepts PDF. You can send several files in one request.

Redact is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/redact with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.