Skip to content

This Python tool anonymizes sensitive personal data in CSV or text files. It helps protect privacy by masking names, emails, phone numbers, credit card details, and addresses while maintaining the file structure. This is useful for data sharing, analytics, and compliance with privacy laws like GDPR and CCPA.

Notifications You must be signed in to change notification settings

prangowda/Privacy-Shield---Personal-Data-Anonymizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Privacy Shield - Personal Data Anonymizer

πŸ” Project Description

Privacy Shield is a Python-based tool designed to anonymize personal data in CSV or text files. It automatically detects and replaces sensitive information such as names, emails, phone numbers, and credit card details, ensuring data privacy and compliance with regulations like GDPR and CCPA.


πŸ›  Features

βœ… Automatically detects and anonymizes names, emails, phone numbers, and credit cards
βœ… Supports CSV and Text Files
βœ… Customizable Masking (Fake data, Hashing, or "XXXX" masking)
βœ… Fast and efficient using pandas and regex
βœ… Helps in data privacy protection and secure data sharing


πŸ“œ Installation

Install the required dependencies using pip:

pip install pandas faker

πŸ“‚ Usage

Run the Python script:

python privacy_shield.py

Follow the prompts:

  1. Enter file type (csv/text)
  2. Enter file path (e.g., data.csv or sample.txt)
  3. Anonymized file is saved as anonymized_data.csv or anonymized_text.txt

πŸ“Š Example Input & Output

πŸ”Ή Original CSV (data.csv)

Name Email Phone Credit Card
Alice alice@gmail.com 987-654-3210 1234-5678-9101-1121
Bob bob@yahoo.com 876-543-2109 2345-6789-0123-4567

πŸ”Ή Anonymized Output (anonymized_data.csv)

Name Email Phone Credit Card
John Doe michael12@example.com 555-123-4567 XXXX-XXXX-XXXX-XXXX
Sarah Smith anna.williams@mail.com 333-987-6543 XXXX-XXXX-XXXX-XXXX

πŸš€ Future Enhancements

πŸ”Ή Encrypt anonymized files before sharing
πŸ”Ή Add database support (MySQL/PostgreSQL)
πŸ”Ή Web-based UI for easy usage

About

This Python tool anonymizes sensitive personal data in CSV or text files. It helps protect privacy by masking names, emails, phone numbers, credit card details, and addresses while maintaining the file structure. This is useful for data sharing, analytics, and compliance with privacy laws like GDPR and CCPA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages