Know what’s on your site before a plaintiff’s firm does
A free privacy audit shows which cookies, pixels and trackers are running — and which ones commonly appear in privacy claims.
If your business collects email addresses, processes payments, or tracks website visitors, you are handling personal data. Under modern privacy regulations like the European Union’s General Data Protection Regulation (GDPR), you cannot collect or use that information simply because a user visited your website. You need a valid, documented justification before you touch a single piece of data.
In privacy law, that justification is called a legal basis (often referred to as a lawful basis).
Understanding how legal bases work is one of the most practical steps you can take to protect your business from regulatory fines and build genuine trust with your customers. Let’s break down what a legal basis actually means, the six options available under the law, and how to pick the right one for your operations.
What Does “Legal Basis” Mean in Data Privacy?
A legal basis is the specific legal ground an organization relies on to justify collecting, storing, using, or sharing an individual’s personal data. Think of it as your official permission slip under the law.
While the concept is most strictly enforced under the EU and UK GDPR, similar principles appear in privacy frameworks worldwide, including Brazil’s LGPD and various data protection laws across Asia and the Middle East. Even in the United States, where laws like the California Consumer Privacy Act (CCPA) focus more on opt-out rights than pre-collection justifications, documenting why you process data is becoming the standard for vendor contracts and global compliance.
There are three strict rules every business must follow regarding legal bases:
- You must choose before you collect: You cannot gather data first and figure out your legal justification later.
- You must tell the user: Your privacy policy must clearly state which legal basis you are using for each type of data processing.
- You generally cannot swap them later: If you ask for a user’s consent to send marketing emails and they say no, you cannot quietly switch your legal basis to “legitimate interest” and email them anyway.
The 6 Legal Bases for Processing Personal Data
Under Article 6 of the GDPR, there are exactly six legal bases for processing standard personal data. None of them is inherently better or more important than the others. The right choice depends entirely on your relationship with the individual and what you are trying to accomplish.
1. Consent
Consent means the individual has given you clear, explicit permission to process their data for a specific purpose. Under modern privacy standards, consent has a very high bar. It must be freely given, specific, informed, and unambiguous.
Pre-ticked boxes, silence, or burying permission inside a 20-page Terms of Service document do not count. Furthermore, users must be able to withdraw their consent just as easily as they gave it.
- Real-world example: A customer actively checks an unticked box at checkout to subscribe to your weekly promotional newsletter.
2. Performance of a Contract
You can rely on contractual necessity when you need to process someone’s data to fulfill a contract you have with them, or because they asked you to take specific steps before entering into a contract (like requesting a quote).
The key word here is necessary. If you can deliver the service without a particular piece of data, this legal basis does not cover it.
- Real-world example: An online store collects a buyer’s credit card number and home address to process payment and ship a pair of shoes. Using that same email address for upsell campaigns, however, is not covered by the contract.
3. Legal Obligation
Sometimes, you have no choice but to process personal data because another law requires you to do so. This applies to statutory laws, tax regulations, and court orders, not private business contracts.
- Real-world example: An employer collects a new hire’s tax identification number and salary details to report income to the government and process payroll taxes.
4. Vital Interests
This legal basis applies only in life-or-death situations. You can process personal data without permission if doing so is necessary to protect someone’s life or physical safety, and that person is physically or legally incapable of giving consent.
- Real-world example: A paramedic accesses an unconscious patient’s medical history in a hospital database to check for severe drug allergies before administering emergency treatment.
5. Public Task
Public task (or public interest) is primarily used by government agencies, public authorities, and organizations carrying out an official function laid down by law.
- Real-world example: A local municipality processes resident property records to assess annual property taxes or maintain public infrastructure.
6. Legitimate Interests
Legitimate interests is the most flexible legal basis, but it also requires the most internal documentation. It applies when you use personal data in a way that people would reasonably expect, with a minimal impact on their privacy, or when you have a compelling business justification.
To use legitimate interests, you must complete a three-part assessment (often called a Legitimate Interests Assessment, or LIA):
- Purpose test: Identify a genuine, specific business or societal interest (such as preventing fraud or securing your IT network).
- Necessity test: Confirm that processing the data is actually necessary to achieve that goal, and that there is no less intrusive way to do it.
- Balancing test: Weigh your business interests against the individual’s privacy rights. If your processing could surprise or harm the user, their rights override your interests.
- Real-world example: A software company logs user IP addresses to detect and block brute-force cyberattacks on its login page.
Quick Comparison: Choosing the Right Legal Basis
| Legal Basis | When to Use It | Common Business Example |
|---|---|---|
| Consent | The user has a genuine, unrestricted choice to say yes or no. | Email marketing opt-ins, non-essential website cookies. |
| Contract | The data is strictly required to deliver a product or service the user requested. | Shipping addresses, billing details, account login credentials. |
| Legal Obligation | A specific statute, court order, or regulation forces you to keep or share the data. | Tax records, anti-money laundering (AML) checks, employee payroll. |
| Vital Interests | Someone’s life is in immediate danger and they cannot consent. | Emergency medical care, disaster response. |
| Public Task | You are a public body or executing an official statutory duty. | Public health reporting, tax collection, university administration. |
| Legitimate Interests | The use is low-risk, reasonably expected by the user, and passes a balancing test. | Fraud prevention, network security, B2B direct mail. |
What About Sensitive Personal Data?
Privacy laws place extra guardrails around “special category data” (sensitive personal information). This includes data revealing racial or ethnic origin, political opinions, religious beliefs, trade union membership, genetic or biometric data, health records, and information about a person’s sex life or sexual orientation.
If you process sensitive data, having a standard legal basis under Article 6 is not enough. You must also meet a second, stricter condition under Article 9 of the GDPR, such as obtaining explicit consent or proving the data is necessary for healthcare diagnosis or employment law compliance.
3 Common Mistakes to Avoid
Even well-intentioned companies run into trouble when mapping their data flows. Watch out for these three frequent pitfalls:
- Defaulting to consent for everything: Many businesses assume they need a consent checkbox for every interaction. In reality, asking for consent when you are actually fulfilling a contract creates unnecessary risk. If a customer buys a product and later withdraws “consent” for you to process their address, you are stuck in a legal contradiction. Use contract when a contract exists.
- Using legitimate interests for intrusive tracking: Legitimate interests is not a loophole for behavioral ad tracking or selling customer lists to data brokers. Regulators consistently rule that hidden, large-scale profiling overrides an individual’s reasonable expectations of privacy.
- Hiding legal bases in vague privacy policies: Saying “we may use your data under various legal bases” is no longer acceptable. You need to match specific activities (like newsletter signups or order fulfillment) to their exact legal grounds inside your privacy notice.
How to Document Your Legal Basis
Under the GDPR’s accountability principle, claiming you have a legal basis is only half the job. You have to prove it if a regulator asks.
Start by creating a simple Record of Processing Activities (ROPA) in a spreadsheet or compliance tool. List every category of personal data your company collects, write down why you collect it, and assign one of the six legal bases to each activity. If you rely on consent, keep timestamped logs showing when and how the user opted in. If you rely on legitimate interests, save a written copy of your three-part balancing test.
Taking an afternoon to map out your legal bases takes the guesswork out of compliance and ensures your business collects data responsibly from day one.
Put this into practice
Turn privacy guidance into working controls.
Captain Compliance helps teams discover tracking technologies, enforce consent, manage privacy requests and document the evidence behind every decision.