skillfed

scrubadub

Clean personally identifiable information from dirty dirty text.

scrubadub v2.0.1 2.5M downloads/30d#3,049 on PyPI432
Permissive license MIT DORMANT released

What it is and what it does

Scrubadub is a text anonymization library that identifies and replaces sensitive personal information in unstructured text. It ships with built-in detectors for common PII categories—names, emails, phone numbers, credit card numbers, dates of birth, social security numbers, and others—and replaces matches with standardized placeholders like {{EMAIL}} or {{PHONE}}. The library is highly configurable, allowing you to enable or disable specific detectors, customize replacement strategies, and adapt behavior for different languages and regions through optional extensions.

The package depends on several NLP and data-parsing libraries (textblob, phonenumbers, python-stdnum, dateparser, scikit-learn, faker, catalogue, and typing-extensions) to perform pattern matching and validation across its detector suite. It is intended for workflows where you need to prepare datasets for sharing, testing, or analysis while protecting individual privacy—common in data science, compliance, and software testing contexts.

Use it for:

  • Prepare real customer datasets for sharing with external teams or for use in testing environments without exposing actual PII.
  • Anonymize support tickets, chat logs, or user feedback before storing them in non-secure systems or using them for model training.
  • Redact sensitive information from documents before publishing case studies, examples, or internal documentation.
  • Generate synthetic test data by scrubbing production logs and then using faker to regenerate realistic but non-real personal details.
  • Audit and clean data pipelines to ensure PII is not accidentally leaked in logs, error messages, or intermediate outputs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Detects and replaces personally identifiable information (names, emails, phone numbers, credit cards, dates of birth, social security numbers, and more) in free text with anonymized placeholders.

Yes, with conditions. Scrubadub is stable, permissively licensed, and has no known security vulnerabilities, making it suitable for production use in established data anonymization workflows. However, maintenance is dormant, so if you need active bug fixes or feature development, evaluate whether the package's current detector coverage meets your needs. For standard use cases (email, phone, credit card, SSN redaction), it remains a solid choice.

Install

scrubadub on PyPI

pip

pip install scrubadub

uv

uv add scrubadub

poetry

poetry add scrubadub

Installing scrubadub

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance is dormant—last release was in 2023—but the package is marked Production/Stable and has seen no security vulnerabilities. Suitable for established use cases where active development is not required.

License in practice

Licensed under MIT (permissive), allowing use in commercial and private projects with minimal restrictions. No license-related barriers to adoption.

Quickstart

pip install scrubadub

import scrubadub
text = "Contact me at example@example.com or call"
print(scrubadub.clean(text))

Requires Python 3.6 or later; Python 2.7 and 3.5 are not supported in this version.

Verify before relying

  • Accuracy and recall rates for each detector type across different text formats and languages.
  • Performance characteristics when processing large documents or high-volume text streams.
  • How well address detection works for non-US/GB/CA regions and whether optional extensions are necessary for production use.
  • Whether the dormant maintenance status affects compatibility with recent Python 3.x releases.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 8 — textblob, phonenumbers, python-stdnum, dateparser, catalogue, scikit-learn, typing-extensions, faker
Maintenance dormant — 1,078 days since the last release
Last repo commit
First released
Downloads 2,470,289/month — #3,049 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: scrubadub-2.0.1-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: LibrariesTopic :: Text ProcessingTopic :: Utilities

Tags

remove personally identifiable informationanonymize text datascrub pii from textredact sensitive informationclean personal datatext anonymizationpii detection and removal
pii-detectiondata-anonymizationtext-processing

More Libraries packages