---
title: "Open Source, Self-Hosted PII & PHI Redaction API"
description: "Philter is an open source REST API that redacts PII and PHI in your own cloud. Self-host it free under Apache-2.0, or launch it from your cloud marketplace."
url: "https://philterd.ai/philter/"
---

Self-hosted PII and PHI redaction API

# Philter

Philter finds and redacts PII and PHI in text and PDFs inside your own cloud. That helps you share, analyze, and build on sensitive documents without handing them to another vendor, and it supports your HIPAA and other compliance efforts.

[Deploy in your cloud](https://philterd.ai/philter/deploy/) [View on GitHub](https://github.com/philterd/philter)

[Star: 67](https://github.com/philterd/philter)

Available on

- [AWS Marketplace](https://aws.amazon.com/marketplace/pp/B07YVB8FFT?ref=_ptnr_mf_launch)
- [Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/philterdllc1687189098111.philter?tab=Overview)
- [Google Cloud Marketplace](https://console.cloud.google.com/marketplace/product/philterd-public/philter)

Send Philter text. Get back redacted text.

```
$ curl -sk https://localhost:8080/api/filter \
    -H "Authorization: Bearer $PHILTER_API_KEY" \
    -H "Content-Type: text/plain" \
    --data-binary "His SSN was 123-45-6789."

His SSN was {{{REDACTED-ssn}}}.
```

SDKs for [Java SDK](https://github.com/philterd/philter-sdk-java), [OpenAPI spec (any language)](https://github.com/philterd/philter/blob/main/docs/docs/api_and_sdks/openapi.json).

[Documentation →](https://philterd.github.io/philter/) [Release Notes →](https://github.com/philterd/philter/releases) [GitHub →](https://github.com/philterd/philter) [Client libraries →](https://philterd.ai/packages/)

## Try it live

Try it out! Select one of the industries and click Redact to redact the text.

Input Patient Margaret Collins, born on 04/12/1978, with SSN 523-88-4021 was admitted to the ER at St. Luke's Medical Center. Her primary care physician, Dr. Howard Banks, can be reached at hbanks@stlukesmed.org or (555) 342-9187.

Redacted output

The redacted text appears here after you click Redact.

Do not enter PHI or PII.

## Redaction is much more than \*\*\*\*\*.

Redaction is much more than finding words and replacing them with asterisks.

 ![The test card number 4111111111111111 and what seven Philter filter strategies turn it into. Redact gives {{{REDACTED-credit-card}}}, Mask gives sixteen asterisks, Keep the last four gives 1111, Hash gives a 64-character SHA-256 value, Encrypt gives an encrypted token, Format-preserving encryption gives a different 16-digit number, and Fake value gives a random card number.](https://philterd.ai/images/philter-strategies-card-number-narrow.svg)

One detected card number and seven ways a policy can replace it, from a run against Philter 4.0.0. The encrypted and fake values depend on the key or are generated on each run, so yours will differ. 4111111111111111 is a standard test card number.

### Choose what to redact

Philter can detect and redact many PII and PHI types (names, ages, phone numbers, ID numbers, credit card numbers, VINs, SSNs and ITINs, and more), and you decide which to act on.

### Choose how to redact

For every entity type, choose how it's handled: redact or mask it, keep its last four digits, hash it, encrypt it (including format-preserving encryption), or replace it with a fake value of the same type.

### Redact only certain instances

Need to redact only some names, or only zip codes above a population threshold, or only credit cards that pass Luhn validation? Philter's policy engine handles it.

## Frequently asked questions

If something here isn’t covered, [get in touch](https://philterd.ai/philter/#) and we’ll answer.

What is Philter?

Philter is an application that redacts protected health information (PHI), personally identifiable information (PII), non-public personal information (NPPI), and other sensitive information from text. Philter processes plain text and PDF documents. Philter runs in your private cloud so your sensitive data never has to traverse the public internet. Use Philter's API to process text from virtually any system or process. Philter is open source. Learn more on [GitHub](https://github.com/philterd/philter/).

How long has Philter been around?

Phileas (the open source library underneath Philter) came first, and Philter followed as the API layer on top. The toolkit has been continuously maintained since 2019 and predates the current wave of LLM-wrapper privacy tools. The detection engine is a hybrid of purpose-built NLP models and pattern matching, not a prompt sent to a third-party LLM. You can inspect the full commit history, every model, and every line of policy logic on [GitHub](https://github.com/philterd).

Does Philter use ChatGPT or other third-party APIs?

**No.** Philter never transmits your text or documents to any third-party service. Philter can run in a firewalled (or even air-gapped) environment. For example, in AWS you can deploy Philter to a private subnet and use security groups and network ACLs to prevent any outbound traffic from the instance and its subnet, and we recommend doing so to strengthen your overall security posture.

Do we need a BAA with Philterd?

Philter runs in your own environment and Philterd never receives your PHI, so there is no BAA to sign with us. [This guide](https://philterd.ai/guides/why-philterd-doesnt-sign-a-baa/) explains why.

Is Philter open source?

Yes. Philter is open source under the Apache License, Version 2.0. Check out the code, file issues, and contribute on [GitHub](https://github.com/philterd/philter).

What types of PII, PHI, and sensitive information can Philter redact?

Philter detects many entity types and we add new ones regularly. Among them: Ages · Bitcoin Addresses · US Cities · US Counties · Credit Card Numbers · Custom Dictionaries · Custom Identifiers (e.g. medical record numbers, transaction numbers) · Dates · US Driver's License Numbers · Email Addresses · Hospital Names · IBAN Codes · IP Addresses (IPv4 and IPv6) · MAC Addresses · Passport Numbers · Persons' Names (fuzzy matching, first/last/whole) · Phone/Fax Numbers · Physician Names · SSNs and TINs · Shipping Tracking Numbers · US States · URLs · VINs · US Zip Codes

How does Philter know what to redact?

You create policies that tell Philter which types of PII and PHI to find and how to handle them. A policy lists the entity types (phone numbers, names, etc.), when to act on them, and how to redact them. You can have as many policies as you need and select which one to apply per request. Policies are documented in Philter's [User's Guide](https://philterd.github.io/philter/).

How does Philter identify sensitive information?

Philter uses a variety of methods, including specially trained machine learning models. A Philter *lens* is a trained model for a specific kind of text. Using a lens that matches your data gives you more accurate results. Philter includes the English Names (Small) lens, which its default policy uses to detect names inside Philter, with no separate service. Larger English lenses are in the [lens catalog](https://philterd.ai/ph-eye/#lenses); run one in [PhEye](https://philterd.ai/ph-eye/) and point your policy at it.

How is Philter deployed?

Philter can be deployed as a container or directly into your cloud from the AWS, Google Cloud, or Microsoft Azure marketplaces in just a few minutes. [Deploying Philter in 5 minutes on the AWS Marketplace](https://philterd.ai/blog/deploy-philter-in-5-minutes-aws-marketplace/) walks through the marketplace route end to end, from subscribing to the first redacted response. For containers, see the [quick start](https://philterd.ai/dev/start/).

How do I send text to Philter for redaction?

Three options: 1. Call the HTTP API directly. Philter accepts text and returns the redacted text. Generate a client in any language from the [Philter OpenAPI specification](https://philterd.github.io/philter/latest/api_and_sdks/api.html). 2. Use the Philter CLI for convenient command-line access. 3. Use the open source [Java SDK](https://github.com/philterd/philter-sdk-java).

What are Philter's accuracy, precision, and recall metrics?

Precision and recall depend greatly on your data. Every dataset is different, so quoting a single F1 score across users would be meaningless. If a vendor cites accuracy without seeing your documents, be very cautious. We'd rather take some representative text from you and spend a few days gathering precision and recall metrics specific to your data, then send those back to you alongside the redacted output.

Is Philter guaranteed to find 100% of all sensitive information?

Philter uses state-of-the-art NLP technology, which is fundamentally non-deterministic. Identification accuracy depends on how similar your text is to the training corpus, how the text is formatted, and how long it is. For that reason, it's important to assess Philter's performance on your own data before relying on it in production. Every detected entity has a confidence score between 0 and 100. The `confidence` condition in a filter strategy lets you tune detection. For example, `confidence > 75` ignores entities the model isn't sure about and only redacts high-confidence matches.

How does Philter compare with Amazon Comprehend, Google DLP, and similar services?

Direct comparisons are tricky because Philter is designed differently. Philter goes beyond identification. It includes disambiguation, ignore lists, value replacement, and consistent pseudonymization out of the box. The other services may technically support some of these, but only if you build them yourself on top. Philter is also *not* a managed SaaS API. You deploy it into your environment and call its API over your own network, so your text never has to leave your perimeter. We think that's substantially more secure than handing sensitive text to a third-party API. Finally, Philter is flexible: you can use your own models and you have full control over the filtering pipeline. For a side-by-side breakdown against Amazon Comprehend, Google Cloud DLP, Microsoft Presidio, Private AI, and others, see our [comparison page](https://philterd.ai/compare/).

What is Philter's license agreement?

Philter is open source software under the Apache License, Version 2.0. The full [Philter license agreement](https://philterd.ai/philter-license-agreement/) is published on this site, and the licensing details are also available on the [project repository](https://github.com/philterd/philter).

## Related products

- [Phinder: Map where sensitive data lives across your storage before you point Philter at it.](https://philterd.ai/phinder/)
- [Phield: Track trends in the PII Philter redacts, and get alerted when a type spikes.](https://philterd.ai/phield/)
- [Philter Scope: Score Philter's redaction on precision and recall against your own gold-standard data.](https://philterd.ai/philter-scope/)

## Ready to use Philter?

Three ways to get going: deploy the open source yourself, spin it up from a cloud marketplace, or work with our team directly. Pick the path that fits.

[See your options](https://philterd.ai/pricing/)
