ConsentPixel – Privacy · Verified

AI · Verified October 2026

AI & the GDPR: Lawful Basis for AI Data Processing

Every time your site's AI touches a visitor's personal data, GDPR AI processing rules require a lawful basis for it — one of six, chosen before the processing starts, not retrofitted after. Most teams assume "consent" and stop there. The reality is richer: consent is one option, legitimate interest is another the EDPB has carefully mapped, and automated decisions trigger a separate rule entirely. This is the plain-English 2026 guide to picking the right basis — and the US risk that outlives whichever one you choose.

By ConsentPixel TeamUpdated October 202613 min readReviewed against GDPR, EDPB guidance & current rulings
6 lawful bases
GDPR gives you six options for AI — consent is only one, and none ranks above another
Article 22
Solely-automated decisions with legal or significant effects need their own, stricter basis
$5,000 / violation
The US CIPA risk that persists whichever GDPR basis you pick, until you block before processing
Disclosure & scope: This is an educational guide and general information, not legal advice. ConsentPixel is a consent-management product, not a law firm, and no tool makes a website automatically "compliant." Laws, dates and regulatory guidance were verified against public sources in October 2026 and evolve quickly; confirm your lawful-basis choices with a qualified advisor.
The short answer

Under GDPR, AI processing of personal data needs a lawful basis chosen up front — one of the six in Article 6. For most website AI, the realistic choices are consent (a specific, informed opt-in) or legitimate interest (which the EDPB says can work for AI, but only after a three-step test). Which fits depends on what the AI does and whether a visitor would reasonably expect it. On top of that, if the AI makes a solely automated decision with legal or significant effects, Article 22 adds a separate, stricter rule — usually requiring explicit consent.

Below: whether AI data is even "personal data," the six bases applied to AI, consent vs legitimate interest in practice, the EDPB's test, Article 22 automated decisions, special-category data — and why the US CIPA exposure survives whichever basis you land on.

"Do we have consent?" is the wrong first question for AI. The right one is "what's our lawful basis, and did we pick it before the AI started processing?" Because under the GDPR, artificial intelligence doesn't get a special pass — the moment an AI feature reads, profiles or learns from a visitor's personal data, that's processing, and processing without a valid basis is unlawful no matter how useful the feature is. The good news is that GDPR gives you a menu, not a single door. This guide walks the menu, shows which option fits which kind of AI, and flags the one duty — and the one US risk — that most "GDPR and AI" explainers quietly skip.

First question: is your AI touching personal data at all?

The GDPR only applies to personal data, so start there. Under Article 4(1), personal data is any information relating to an identified or identifiable person — and that's broad enough to catch far more AI input than teams expect. For AI personal data under GDPR, the usual culprits are:

  • Conversational input — everything a visitor types into a chatbot, which routinely includes names, emails, order details, and sometimes health or financial information.
  • Identifiers & behaviour — IP address, device and cookie IDs, session and clickstream data fed to a personalisation or recommendation model.
  • Profiles & inferences — the outputs an AI generates about a person (a propensity score, a segment, a prediction) are themselves personal data.
  • Training data — personal data used to train or fine-tune a model is processing in its own right, with its own basis required.

A crucial nuance from recent EU regulatory guidance: a trained AI model is not automatically "anonymous." If individuals can still be identified from or through the model, it remains personal data and the GDPR keeps applying — full anonymisation is a high bar, not a default. So the practical answer is that almost any AI interacting with your visitors is processing personal data, which means the lawful-basis question is unavoidable. (If you're not sure what AI is even running, our guide to whether your website is using AI on visitors is the place to start.)

The six GDPR lawful bases, applied to AI

Article 6 lists six lawful bases, and a core GDPR principle is that none ranks above another — the "best" basis is the one that genuinely fits your purpose. Here's how each maps to AI on a website, and how often it's realistically available.

Lawful basisWhen it fits AIRealistic for website AI?
ConsentNon-essential AI: chat assistants, personalisation, profiling, using conversations to improve modelsOften — the default for optional AI
Legitimate interestAI the business needs and the visitor would expect, where rights aren't overridden (fraud detection, some security AI)Sometimes — only after the 3-step test
ContractAI strictly necessary to deliver what the user asked for (an AI feature that is the product)Narrowly — must be truly necessary
Legal obligationAI processing a law requiresRarely on a website
Vital interestsAI needed to protect someone's lifeAlmost never online
Public taskAI for official functions in the public interestMainly public bodies

For most commercial websites, the contest is between the first two. Everything optional — the chatbot, the recommender, the "we use your conversations to improve our AI" line — lands on consent. The genuinely necessary, expected processing might rest on legitimate interest, but only if you can defend it. So let's put those two head to head.

This is the decision that trips up the most teams, so be concrete about the trade-off.

ConsentGDPR Art. 6(1)(a)
Opt-in

A freely given, specific, informed, unambiguous opt-in, captured before the AI processes anything. Strong for optional AI; the visitor is in control and can withdraw. The cost: you must actually block the AI until they say yes, and prove it.

Legitimate interestGDPR Art. 6(1)(f)
Balancing

No opt-in needed, but you carry the burden: a documented three-step assessment showing a real interest, that the AI is necessary, and that it doesn't override the visitor's rights. Fragile for intrusive or unexpected AI — and it can't cure Article 22 or special-category duties.

The rule of thumb that holds up in practice: the more a visitor would be surprised by what the AI does, the more you need consent. A fraud-detection model running quietly in the background is a plausible legitimate-interest candidate. A chatbot that feeds conversations to a third-party vendor to train models, or a personalisation engine building rich profiles, is the kind of processing people don't expect — and legitimate interest gets hard to defend fast. When in doubt for optional, visitor-facing AI, consent is the safer and clearer basis. This is also why AI needs its own consent purpose rather than hiding inside a cookie category — a point we unpack in why automated processing deserves its own consent category and what AI-aware consent means.

The EDPB three-step test for legitimate interest

If you want to lean on legitimate interest as the lawful basis for AI, you don't get to simply assert it. The European Data Protection Board's 2024 opinion on AI models set out how regulators expect the assessment to run, and it's a three-step gate — fail any step and the basis doesn't hold.

1 Legitimate interest Is there a real, lawful interest? (fraud detection, security, core improvement) 2 Necessity Could anonymised or synthetic data do it? Is the AI the least-intrusive way? 3 Balancing Do the visitor's rights override your interest? Would they reasonably expect this? Fail any step and legitimate interest doesn't hold — you fall back to consent. Document the whole assessment (an LIA).

Two points from that guidance matter most for website teams. First, necessity bites harder than people expect: if anonymised or synthetic data could achieve the purpose, you're expected to use it, and "personal data is more convenient" isn't necessity. Second, the balancing test turns on reasonable expectations — whether the data was public, the context in which it was collected, and whether a visitor would anticipate this use. The more surprising the AI, the heavier this step weighs against you. Document the assessment in a Legitimate Interests Assessment (LIA); if you can't produce it, you effectively don't have the basis.

Article 22: when AI makes the decision

Here's the rule that sits on top of your Article 6 basis and catches a lot of AI by surprise. Article 22 of the GDPR gives people the right not to be subject to a decision based solely on automated processing — including profiling — that produces legal effects or similarly significant effects. If your AI decides something consequential about a person with no meaningful human involvement, Article 22 applies and a general lawful basis isn't enough on its own.

  • "Solely" automated means no substantive human involvement — a human rubber-stamping the model's output doesn't count; the reviewer must be able to actually change the decision.
  • "Legal or similarly significant effects" is a high bar: automatic refusal of a credit application, a decision that denies a benefit or service. Trivial personalisation usually falls outside it — but automated eligibility, pricing or access decisions can fall inside.
  • It's generally prohibited unless one of three exceptions applies: the decision is necessary for a contract, authorised by law, or based on the person's explicit consent. For most websites, explicit consent is the realistic route.
  • Safeguards are mandatory — even with a valid exception, the person has the right to human intervention, to express their view, and to contest the decision. EU courts have already read consequential profiling such as credit scoring into Article 22's scope, so "it's just a score" is not a safe assumption.

The practical upshot: if your AI makes meaningful decisions about people automatically, map it against Article 22 first. You may need explicit consent (a higher bar than ordinary consent) plus a human-review path — which is a materially different build than a chatbot that just answers questions.

Special-category data: the higher bar

One more layer, because AI is unusually good at stumbling into it. If your AI processes special-category data — health, racial or ethnic origin, political opinions, religious beliefs, trade-union membership, genetic or biometric data, sex life or sexual orientation — Article 9 raises the bar: you generally need explicit consent or another narrow Article 9 condition, on top of your Article 6 basis.

The trap is inference. A visitor describing symptoms to a healthcare site's chatbot, or a model inferring health or ethnicity from behaviour, can pull you into special-category processing even if you never asked for it directly. For any AI that predictably elicits or infers sensitive attributes, assume the higher bar applies and design consent accordingly.

See what processes data before consent

Which AI tools fire before a basis is in place?

Whatever lawful basis you choose, it only works if the AI doesn't process data before the visitor consents or before your basis is engaged. Our free scanner shows which trackers and AI tools — chatbots included — fire before consent on your site, in about 10 seconds. It's the fastest way to see whether your basis is real or just on paper.

Scan your site free →
No account needed · results in ~10 seconds · information, not legal advice

The US risk GDPR can't fix — and why it changes your design

Here's the part competitor "GDPR and AI" guides almost always omit, and it's where the stakes compound for any US-facing site. You can pick a flawless GDPR lawful basis and still be exposed in the United States, because US privacy litigation doesn't run on GDPR's lawful-basis logic at all. The fastest-growing front is California's CIPA — a 1960s anti-wiretapping law — now aimed at AI chat. The theory: when a third-party AI vendor reads a visitor's conversation in real time without consent, it's an unconsented eavesdropper under CIPA Section 631, and the site that installed it "aided" the interception. Statutory damages are $5,000 per violation under California Penal Code §637.2, aggregated across a class.

Two facts make this reshape your design, not just your legal memo. First, California's 2026 reform (SB 690) narrowed one CIPA theory but left the §631 wiretapping theory intact, so the AI-chat exposure didn't go away. Second — and this is the standout — the CIPA fix is the same action that makes your GDPR consent basis real: block the AI from processing until the visitor consents. If nothing is intercepted before consent, the CIPA fact pattern never forms and your Article 6 consent basis is genuinely in place rather than notional. One prevention-first control satisfies the EU basis and removes the US risk at once — which is exactly why, for AI, "block then log" beats "pick a basis and hope." You can follow the live US caseload on our CIPA lawsuit tracker, and the mechanics on our CIPA overview.

Choosing and documenting your basis

Pulling it together, here's the sequence that gets you to a defensible position for any AI feature — and the order matters.

Confirm it's personal data

If the AI touches identifiers, conversations, profiles, inferences or training data about people, GDPR applies. Assume it does unless you've genuinely anonymised.

Check Article 22 first

Does the AI make a solely automated decision with legal or significant effects? If so, you likely need explicit consent plus a human-review path — resolve this before anything else.

Check for special-category data

Could the AI process or infer health, ethnicity or other sensitive attributes? If so, the Article 9 explicit-consent bar applies on top.

Pick the Article 6 basis

Optional, visitor-facing AI → consent. Necessary, expected, background AI → legitimate interest, but only with a documented three-step LIA. When unsure, choose consent.

Engineer it so the basis is real

Block AI data processing until the basis is engaged (consent captured, or LI genuinely applicable), log notice and consent per visitor, and keep the LIA. A basis you can't evidence is a basis you don't have.

That last step is the whole game. A lawful basis isn't a line in a privacy policy — it's a claim you have to be able to back with evidence and with the technical reality of when the AI actually started processing. Get the sequencing and the record right, and the paperwork takes care of itself. For the distinction between disclosing AI and getting consent for it — two duties teams constantly merge — see AI disclosure vs AI consent.

Key takeaways

  • AI needs a lawful basis chosen up front — one of GDPR's six, picked before processing, not retrofitted. None ranks above another.
  • For website AI it's usually consent vs legitimate interest — optional, visitor-facing AI leans to consent; necessary, expected AI may use legitimate interest, but only after the EDPB's three-step test.
  • The EDPB test is a real gate — legitimate interest → necessity (anonymised/synthetic first) → balancing (reasonable expectations). Document it in an LIA or you don't have the basis.
  • Article 22 sits on top — solely automated decisions with legal or significant effects usually need explicit consent plus a human-review path.
  • Special-category data raises the bar — health, ethnicity and the rest trigger Article 9 explicit consent, and AI can infer them without you asking.
  • GDPR can't fix the US risk — but the CIPA fix is the same move: block AI from processing until consent, which makes your GDPR basis real and removes the $5,000-per-violation wiretapping fact pattern at once.

Frequently asked questions

What lawful basis do I need for AI processing under GDPR?

You need one of the six lawful bases in Article 6 GDPR, chosen before the AI processes personal data. For most website AI the realistic options are consent (a specific, informed opt-in) or legitimate interest (valid only after a documented three-step assessment). Optional, visitor-facing AI such as chatbots, personalisation and profiling usually requires consent; necessary, expected background processing such as some fraud detection may rest on legitimate interest. No basis ranks above another — the right one is the one that genuinely fits your purpose. This is general information, not legal advice.

Can I use legitimate interest instead of consent for AI?

Sometimes, but you carry the burden of proof. The European Data Protection Board's 2024 opinion on AI models confirms legitimate interest can be a valid basis, but only after a three-step test: there must be a real legitimate interest; the processing must be necessary (if anonymised or synthetic data could achieve the purpose, you should use it); and a balancing test must show the visitor's rights don't override your interest, weighing heavily on whether they would reasonably expect the processing. Document this in a Legitimate Interests Assessment. For intrusive or unexpected AI, legitimate interest is hard to defend and consent is safer.

Is AI input and output personal data under GDPR?

Usually yes. Under Article 4(1), personal data is any information relating to an identifiable person, which captures chatbot conversations, identifiers like IP and cookie IDs fed to models, the profiles and inferences AI generates about people, and personal data used to train models. Recent EU regulatory guidance also stresses that a trained AI model is not automatically anonymous — if individuals can still be identified from or through it, the GDPR keeps applying. In practice, almost any AI interacting with your visitors processes personal data, so the lawful-basis question is unavoidable.

What is Article 22 and when does it apply to AI?

Article 22 GDPR gives people the right not to be subject to a decision based solely on automated processing, including profiling, that produces legal or similarly significant effects — for example an automatic refusal of a credit application. Solely automated means no meaningful human involvement; a human rubber-stamp doesn't count. It is generally prohibited unless the decision is necessary for a contract, authorised by law, or based on the person's explicit consent, and even then safeguards apply, including the right to human intervention and to contest the decision. If your AI makes consequential decisions about people automatically, map it against Article 22 before relying on an ordinary Article 6 basis.

Does GDPR AI consent also protect me from US lawsuits?

No — US privacy litigation doesn't run on GDPR's lawful-basis logic. The fastest-growing US risk is California's CIPA, a wiretapping law now aimed at AI chat: when a third-party AI vendor intercepts a visitor's conversation in real time without consent, plaintiffs allege the site aided unlawful eavesdropping, with statutory damages of $5,000 per violation under Penal Code §637.2. The 2026 SB 690 reform left the Section 631 theory intact. The useful overlap is that the same control fixes both: block the AI from processing until the visitor consents, which makes your GDPR consent basis real and removes the CIPA fact pattern at the same time. This is general information, not legal advice.

How do I document a lawful basis for AI?

Work in order: confirm the AI touches personal data; check whether Article 22 applies (solely automated decisions with legal or significant effects, which usually need explicit consent plus human review); check for special-category data under Article 9 (which needs explicit consent); then pick the Article 6 basis — consent for optional visitor-facing AI, or legitimate interest with a documented three-step assessment for necessary, expected processing. Finally, engineer it so the basis is real: block AI processing until the basis is engaged, log notice and consent per visitor, and keep your assessment. A basis you can't evidence, or that the AI ignores by processing before consent, is a basis you don't actually have.

The bottom line

"GDPR and AI" isn't a single rule — it's a short sequence of questions: is it personal data, does Article 22 apply, is it special-category, and which Article 6 basis fits. Answer them in order and the right lawful basis is usually obvious: consent for the optional, visitor-facing AI most sites run, legitimate interest for the narrow, expected, well-documented cases.

And the reassuring part is that the hardest-working control is one thing done at one moment — don't let the AI process a visitor's data until your basis is genuinely in place, and keep the record. That single discipline makes your GDPR basis real and, for any US traffic, removes the CIPA exposure that no choice of lawful basis can touch.

Make sure your lawful basis is real, not just on paper

Scan your site free to see exactly which AI tools and trackers process data before consent — the gap between a lawful basis in your policy and one that actually holds. Then run ConsentPixel free for 14 days: a dedicated AI processing purpose, block-before-consent, per-visitor logs — GDPR + the AI Act + CIPA, on any platform.

Scan your site free →
No account for the scan · then a 14-day trial, no credit card, from $8.99/domain/mo · see the AI consent feature · information, not legal advice

Related reading

CP
The ConsentPixel Team

ConsentPixel — Privacy · Verified builds prevention-first consent tooling that blocks AI and tracking tools until visitors genuinely consent, on any platform, and proves consent came first. This is an educational guide and general information, not legal advice; ConsentPixel is not a law firm and does not make any website "fully compliant." Facts reflect the GDPR, EDPB guidance and publicly available rulings as of October 2026; verify your lawful-basis choices with a qualified advisor.

Sources & accuracy: Lawful bases are set out in Article 6 GDPR; special-category conditions in Article 9; automated-decision rules in Article 22; personal data is defined in Article 4(1) (Regulation (EU) 2016/679). The three-step legitimate-interest assessment for AI models reflects the European Data Protection Board's 2024 opinion on AI models and data protection. CIPA figures reference statutory damages under California Penal Code §637.2; SB 690 (2026) narrowed one CIPA theory while leaving the Section 631 wiretapping theory intact. Regulatory interpretation of AI under the GDPR is evolving. This article is general information, not legal advice, and does not create any advisory relationship. Verify current law and any specific deployment with qualified counsel.
Scroll to Top