L-Diversity Calculator
Check the l-diversity of an anonymized dataset by entering the distinct sensitive values in each equivalence class, complementing k-anonymity.
Last reviewed by the Radiatus Cloud team
Check the l-diversity of an anonymized dataset across its groups.
Going for ISO 27001, SOC 2, HIPAA or GDPR?
Radiatus runs end-to-end compliance & GRC programs.
Check l-diversity
L-diversity is a privacy model that strengthens k-anonymity by requiring that each group of records sharing the same quasi-identifiers, an equivalence class, contains at least l well-represented distinct values for the sensitive attribute. This calculator takes the number of distinct sensitive values in each group and reports the achieved l-diversity, which is the smallest such count across all groups, and whether it meets your target. If the least diverse group has two distinct sensitive values, the dataset is two-diverse.
The dataset only meets l-diversity for a given l if every single group has at least l distinct sensitive values.
Beyond k-anonymity
K-anonymity ensures each person is indistinguishable from at least k others, but it does not stop an attacker learning a sensitive attribute if everyone in a group shares the same value. L-diversity closes this gap by demanding variety in the sensitive attribute within each group, defending against such homogeneity and background-knowledge attacks. It is a key concept when publishing or sharing anonymised datasets responsibly.
Even l-diversity has limitations, which later models such as t-closeness address, so it is one tool among several for privacy-preserving data release. All calculation happens locally in your browser.
Related tools
- SOC 2 Evidence Readiness — Interactive checklist to gauge your SOC 2 evidence readiness.
- Privacy Policy Checker — Check if your policy covers standard requirements (GDPR/CCPA basics).
- Compliance Req Finder — Find which standards (ISO, SOC2, HIPAA) apply to your industry/region.
- Audit Readiness Planner — Plan your compliance audit timeline (SOC2, ISO) backwards from deadline.
Frequently Asked Questions
What is l-diversity?
It requires each group of records with the same quasi-identifiers to contain at least l distinct values for the sensitive attribute, strengthening k-anonymity.
How is the achieved l determined?
It is the smallest number of distinct sensitive values across all the equivalence classes, so the weakest group sets the level.
Why is k-anonymity not enough?
If everyone in a k-anonymous group shares the same sensitive value, an attacker still learns it. L-diversity requires variety to prevent this.
What comes after l-diversity?
Models such as t-closeness further refine privacy by considering the distribution of sensitive values, addressing limitations of l-diversity.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Enter the count of distinct sensitive values for each group, one per line.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
SOC 2 Evidence Readiness
ComplianceInteractive checklist to gauge your SOC 2 evidence readiness.
Privacy Policy Checker
ComplianceCheck if your policy covers standard requirements (GDPR/CCPA basics).
Compliance Req Finder
ComplianceFind which standards (ISO, SOC2, HIPAA) apply to your industry/region.