pii-mask

Introduction

What is pii-mask and why it exists.

What is pii-mask?

@pii-mask is a developer-first PII masking toolkit for JavaScript and TypeScript. It detects and masks personally identifiable information in strings, objects, arrays, files, and React components.

Why pii-mask?

  • Zero server calls — all masking runs locally, in Node.js or the browser
  • Six masking modes — mask, redact, anonymize, pseudonymize, tokenize, substitute
  • 21+ built-in detectors — emails, phones, government IDs, financial data, and more
  • Global coverage — detectors for Nigeria, India, US, UK, and other regions
  • Type-safe — written in TypeScript with strict mode, no any

Packages

PackageRole
@pii-mask/coreZero-dependency masking engine
@pii-mask/cliFile I/O adapter for CLI usage
@pii-mask/reactReact components and hooks
@pii-mask/nlpNLP-powered name/place detection

Try it in the browser ↗