Skip to main content

🛡️ PIIFILL: High-Performance PII Redaction CLI & Data Masking Tool

The ultimate PII filler and sensitive information masker. Secure your data with 100% offline, OCR-powered redaction.

PyPI version License: MIT Downloads

Built with precision by Bhavin Sachaniya

Overview • Installation • Basic Usage • Security Analytics • Supported Formats


📖 What is PIIFILL?

PIIFILL is a high-performance command-line utility designed to automatically detect and redact Personally Identifiable Information (PII) from documents, datasets, and images. It serves as a comprehensive PII filler and data anonymization tool, ensuring that sensitive information is masked before files are shared or processed.

🛡️ Key Capabilities & PII Detection

Entity Type Examples Detected Technology Used
Personal Identifiers Names, Phone Numbers, Email Addresses Pattern Matching & NLP
Government IDs SSN (USA), Aadhaar (India), PAN Regional Regex
Financial Data Credit/Debit Cards, IBAN, Swift Codes Luhn Algorithm & Patterns
Location Info Physical Addresses, ZIP Codes, IP Addresses Geo-Patterns
Visual PII Text in Images, Scanned PDFs, Screenshots Integrated OCR

[!IMPORTANT] 100% Offline Processing: PIIFILL is built for maximum privacy. All detection, masking, and OCR processing happen locally on your machine. Your data is never uploaded to any cloud service.


🚀 Quick Start

Installation

Ensure you have Python 3.8+ installed. You can install PIIFILL directly via pip:

pip install piifill-cli==0.1.8

🛠️ Usage Guide

PIIFILL follows a simple two-phase workflow: Scan (To identify) and Mask (To protect).

1. Identify Privacy Risks (scan)

Use the scan command to audit your files. This is a read-only operation that provides a detailed report of potential PII without modifying your source files.

# Scan a single document
piifill scan sensitive_data.pdf

# Perform a deep search in a folder (recursive)
piifill scan ./private_docs/ --recursive

2. Protect Your Files (mask)

Once verified, use mask to generate sanitized versions of your files. By default, it creates an out/ directory with the protected copies.

# Mask a single file
piifill mask user_records.csv

# Mask all files in a directory
piifill mask ./raw_logs/

📂 Working with Folders

Want to clean up an entire folder of data? PIIFILL makes it easy.

Example: Mask every file in a folder

piifill mask ./data_dump/
  • PIIFILL will scan every file in ./data_dump/.
  • It will create a new folder called ./data_dump/out/.
  • All your safe, cleaned-up files will be waiting for you inside the out folder!

Example: Save the safe files somewhere specific

piifill mask ./private_files/ -o ./safe_backup/
  • This takes everything from private_files and puts the safe versions in safe_backup.

⚙️ Command Reference

Command Description Key Options
scan Detects PII and generates a risk report. --recursive, --format
mask Redacts PII and creates safe file copies. -o (output), --mode
config Displays current PIIFILL configuration. N/A
version Displays version and environment info. N/A

🎭 Masking Modes

You can customize how PII is hidden using the --mode flag:

  • mask (Default): Replaces data with descriptive placeholders (e.g., [REDACTED]).
  • redact: Completely removes the sensitive data from the file.
  • tokenize: Replaces data with unique, trackable tokens (e.g., <EMAIL_123>).

📊 Security & Risk Analytics

PIIFILL doesn't just hide data—it helps you understand your privacy posture through integrated analytics:

  • Security Grade: A standardized rating (A to F) based on PII density.
  • Risk Score (0-100): A quantitative metric representing the severity of data exposure.
  • Frequency Analysis: A detailed breakdown of detected entities (e.g., "5 Credit Cards, 12 Emails found").

📂 Supported File Formats & OCR

PIIFILL supports a wide range of formats, including advanced OCR (Optical Character Recognition) support for image-based documents, making it the most versatile PII filler for mixed-media datasets.

Category Extensions Features
Structured Data .csv, .json, .sql, .xlsx Row-level masking & Tokenization
Documents .txt, .pdf, .docx Paragraph-aware redaction
Images (OCR) .png, .jpg, .jpeg Text coordinate detection & Masking

[!TIP] Deep Image Detection: PIIFILL uses built-in OCR capabilities to detect and mask text hidden inside screenshots and scanned documents automatically.


❓ Frequently Asked Questions (FAQ)

1. How do I redact PII from documents offline?

You can use piifill mask <file_path> to redact PII locally. Since PIIFILL processes all data on your machine, it is the safest way to handle sensitive documents without cloud exposure.

2. Is PIIFILL a free PII filler?

Yes, PIIFILL is an open-source tool licensed under MIT. You can use it for both personal and commercial projects at no cost. See pricing.md for details.

3. Does PIIFILL support Aadhaar and SSN masking?

Yes, PIIFILL has built-in support for global identifiers including US Social Security Numbers (SSN) and Indian Aadhaar card details.

4. Can PIIFILL detect PII in screenshots?

Absolutely. PIIFILL includes OCR (Optical Character Recognition) to find and redact PII text inside images like .png and .jpg.


👤 Author

Bhavin Sachaniya


📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for piifill-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piifill-cli 0.2.0
File Size Uploaded
piifill_cli-0.2.0.tar.gz 38.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for piifill-cli 0.2.0
File Interpreter ABI Platform
piifill_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.6 kB

Release files / piifill_cli-0.2.0.tar.gz

Download URL piifill_cli-0.2.0.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
787eef81dc5cfe804beaa0b7f75e44aa52f40961ef4adaa001e09fa0b9260351
BLAKE2b-256 checksum
How to use checksums
08d58e9e4f7899a930fe9a8cca997f0b6aa5772dec33ace094f65941e3bcd9a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / piifill_cli-0.2.0-py3-none-any.whl

Download URL piifill_cli-0.2.0-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab9528df1dd6eb2c79a15eab8028dae551bbb2cdc088ee6d786f02caba40e28c
BLAKE2b-256 checksum
How to use checksums
38fa4230eacf9d0d1a5f1b3f1613481f7e0a77f2ff2fb0ba273f23981a6c8982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page