What is Data masking?

Data masking is a security technique that replaces real data with fictitious yet structurally similar data to prevent unauthorized access while maintaining usability. It is widely used in testing, analytics, and compliance processes to protect sensitive data such as personally identifiable information (PII) and financial records.

Related article: what should decide between an on-premise LLM and a cloud API for sensitive data.

Related approaches include data tokenization, which keeps a mapping from tokens to the original values, and pseudonymization, which replaces identifiers with consistent pseudonyms.