PrivacyQuick

GDPR & ePrivacy

Can you use legitimate interest for cookies?

No, not for the cookie itself. If a cookie isn't strictly necessary, the ePrivacy rules require consent, and the GDPR's legitimate interest basis can't replace it. Legitimate interest has a role elsewhere, in the processing that surrounds exempt cookies and data collected without device access.

  • Plain English
  • Written for website owners
  • Free to read

You can't use legitimate interest instead of consent for non-essential cookies in the EU. Article 5(3) of the ePrivacy Directive requires consent before you store or read information on a visitor's device, unless the storage is strictly necessary for a service the visitor requested. Legitimate interest is a legal basis under GDPR Art. 6(1)(f), and the ePrivacy Directive doesn't recognize it as an alternative to consent for device access. Legitimate interest does have a role, but in a different layer: the processing of personal data around exempt cookies, and some processing that doesn't touch the visitor's device at all.

Two layers, two different questions

Most confusion comes from mixing up two separate legal questions:

LayerQuestionLawOptions
1. Device accessMay I store or read information on this device?ePrivacy Art. 5(3), via national lawConsent, or one of two narrow exemptions (transmission, strictly necessary)
2. ProcessingOn what basis may I process the personal data I then use?GDPR Art. 6Consent, contract, legal obligation, vital interests, public task, legitimate interest

The six GDPR bases live only in layer 2. Layer 1 has its own, much shorter, list. So "we rely on legitimate interest for our analytics cookies" mixes the layers: it gives a layer 2 answer to a layer 1 question.

The GDPR itself points this way. Article 95 says the GDPR doesn't add obligations where the ePrivacy Directive has specific ones with the same objective, which makes the ePrivacy rule the specific law for device access. European regulators, through the EDPB, have long held that the GDPR's legal bases can't be used to lower the protection that Article 5(3) gives. See our explainer on the ePrivacy Directive and cookies for the full structure.

What regulators have said about "legitimate interest" in banners

The EDPB's cookie banner taskforce, which coordinated complaints about cookie banners across EU authorities, published its report in January 2023. One of the practices it examined was banners that list "legitimate interest" as the basis for certain purposes, sometimes with switches already turned on. The authorities agreed that relying on legitimate interest cannot make the storage or access lawful where Article 5(3) requires consent, and raised concerns that presenting legitimate interest in a banner can confuse visitors about what they've agreed to.

In practice, this means a banner shouldn't have pre-enabled "legitimate interest" toggles for analytics, advertising or personalization. Our guide to cookie banner dark patterns covers this alongside the taskforce's other themes.

Why the toggles exist: the TCF

Many sites inherited legitimate interest switches from the IAB Transparency and Consent Framework (TCF), used in programmatic advertising. Earlier TCF versions let vendors declare legitimate interest for several purposes. TCF v2.2, rolled out in 2023, removed legitimate interest as an option for the purposes covering personalized advertising and content profiles, though it remains available for some other purposes. If your site uses the TCF, our guide to IAB TCF 2.2 explains what that means for your setup.

Where legitimate interest does fit

Legitimate interest is a real and useful legal basis. It just answers a different question. Here's where website owners commonly rely on it.

Processing linked to strictly necessary cookies

When a cookie is exempt from consent, you still need a GDPR basis for any personal data processed through it. For a login session, that's often contract (Art. 6(1)(b)). For a security cookie that detects suspicious login attempts, legitimate interest in keeping accounts secure is a natural fit. Recital 49 of the GDPR recognizes network and information security as a legitimate interest. See what counts as a strictly necessary cookie for which cookies qualify in the first place.

Processing that doesn't involve device access

Some processing doesn't store or read anything on the device beyond what's inherent in delivering a web page. Examples:

  • Keeping web server logs for a short period to diagnose errors and defend against attacks.
  • Fraud checks on an order the customer submitted, using the data they entered.
  • Counting requests on your own server in aggregate.

Here, legitimate interest can be a sound basis, provided you pass the balancing test described below. Be careful, though: the EDPB's guidelines on the technical scope of Article 5(3) read the rule broadly. Techniques that run scripts to read device characteristics, such as fingerprinting, or that cause the browser to send identifiers to a third party, can bring you back into layer 1. "Cookieless" doesn't automatically mean "outside ePrivacy". Our guide to cookieless analytics goes into this.

Processing after consent

Once a visitor consents to a cookie, you process the resulting data under a GDPR basis too. For tracking-based purposes like advertising and cross-site profiling, regulators' position is that consent will generally be the appropriate basis for that processing as well. Using consent to get the cookie set and then switching to legitimate interest for what you do with the data would undermine the visitor's choice, and the visitor would rightly expect withdrawal to stop both.

The CJEU's judgment in Meta Platforms v Bundeskartellamt (C-252/21, July 2023) is relevant here. The Court accepted that personalized advertising can in principle be a legitimate interest but found that, for the extensive processing in that case, users' interests and fundamental rights overrode it, partly because users couldn't reasonably expect it.

For narrower follow-on processing, such as aggregating analytics data you collected with consent into reports, the GDPR basis question is less fraught, but the safe practice is to keep the processing within what the visitor consented to.

Arguments that don't change the answer

Some reasons for using legitimate interest come up often. None of them gets around Article 5(3):

  • "We need analytics to run the business." That may be true, but the exemption is about what the visitor requested, not what the business needs.
  • "The data is anonymized." The ePrivacy rule is triggered by storing or reading information on the device, whether or not it's personal data. A cookie with a random ID is still device storage, and the data is usually pseudonymous rather than anonymous anyway.
  • "Our vendor says it's legitimate interest." A vendor's documentation describes its own view. You're responsible for consent on your site.
  • "Visitors expect it nowadays." Reasonable expectations matter in the GDPR balancing test, but they don't create an exemption from the ePrivacy consent rule.

The legitimate interest test, briefly

Where legitimate interest is available, the GDPR expects a three-part assessment, commonly called a legitimate interests assessment (LIA). The EDPB set out its view of the test in Guidelines 1/2024 on Art. 6(1)(f):

  1. Purpose: Is the interest lawful, clearly stated and real, not speculative? The CJEU confirmed in KNLTB (C-621/22, 2024) that a commercial interest can be legitimate.
  2. Necessity: Is the processing actually needed for that interest, or could you achieve it with less data?
  3. Balancing: Do the person's interests, rights and reasonable expectations override yours? Consider the type of data, the context and safeguards like short retention.

Document the assessment. If you rely on legitimate interest, you must say so in your privacy policy and name the interest (GDPR Art. 13(1)(d)), and people have the right to object (Art. 21).

What about the UK?

The UK's Data (Use and Access) Act 2025 amended PECR to add some exceptions to the cookie consent requirement, including for certain analytics and for adapting a site to a visitor's preferences, with conditions such as clear information and a simple way to object. These are new statutory exceptions, not an extension of legitimate interest, and they don't cover advertising. Check the current ICO guidance and commencement position; see UK cookie rules under PECR.

Setting up your banner correctly

  • Remove legitimate interest switches from the banner for analytics, advertising and personalization. Those categories should be consent-based and off by default.
  • Keep strictly necessary items out of the choices. Show them as always active, with a short explanation, and list them in your cookie policy.
  • Describe your legitimate interest processing in the privacy policy, not the banner: server logs, security, fraud prevention, and how to object.
  • Make sure withdrawal stops the processing. If a visitor turns off analytics, stop the scripts and stop using new data from them.

Rule of thumb: if it touches the visitor's device and isn't strictly necessary, ask for consent. Use legitimate interest for what happens on your side, after an honest balancing test.

Next steps

  1. List every purpose your banner or policy says is based on legitimate interest.
  2. For each, ask: does it involve storing or reading information on the device? If yes and it isn't strictly necessary, move it to a consent category.
  3. For the rest, write a short legitimate interests assessment and update your privacy policy.
  4. Check that your banner's categories are all off by default. PrivacyQuick uses four categories, with necessary always on and analytics, functional and marketing consent-based; see the docs.

Frequently asked questions

Can analytics cookies use legitimate interest?

Not in the EU under the general rule. Setting or reading analytics cookies needs consent under ePrivacy Article 5(3) unless a national exemption for audience measurement applies, and legitimate interest doesn't change that.

Why do some cookie banners have legitimate interest toggles?

Mostly because of older versions of the IAB's Transparency and Consent Framework, which let vendors claim legitimate interest for some purposes. Regulators have criticized this, and TCF v2.2 removed legitimate interest for advertising and content personalization purposes.

Is legitimate interest ever valid for website data?

Yes. It can be a suitable GDPR basis for processing personal data linked to strictly necessary cookies, such as security, and for some processing that doesn't involve storing or reading information on the device, subject to a balancing test and the right to object.

Check your own website in 30 seconds

Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.

Run a free cookie scan Start free

This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.