Compliance

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.

Get a free readiness review

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

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.

Data: None
Client-side-Side
Active
v1.0

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.