Bot protection and GDPR: is fingerprinting legal?
Short answer
Fingerprinting for bot protection can be lawful in the EU, but two sets of rules apply. The GDPR needs a lawful basis, and fraud prevention and security are recognised legitimate interests. The ePrivacy Directive separately requires consent for reading information from a device unless it is strictly necessary for a service the user asked for. Whether a security check meets that exemption depends on the case and the country.
This page describes the EU rules in general terms. It is not legal advice. The answer for a specific site depends on the countries it serves, what it collects and why, so involve your data protection officer or a lawyer before you deploy fingerprinting.
Which laws apply to bot detection in the EU?
Two sets of rules overlap.
The General Data Protection Regulation (GDPR) covers any processing of personal data. Recital 30 names online identifiers, such as IP addresses and cookie identifiers, as data that can identify a person. In Breyer (C-582/14), the Court of Justice of the EU held that a dynamic IP address can be personal data for a website operator that has legal means to identify the person behind it. Device and browser fingerprints, which exist to recognise a device again, usually fall in the same category.
The ePrivacy Directive (2002/58/EC, amended in 2009) adds Article 5(3). Storing information on a user's device, or gaining access to information already stored there, needs the user's consent. There are two exemptions: when it is needed only to transmit a communication, or when it is strictly necessary to provide a service the user explicitly requested. In Planet49 (C-673/17), the Court held that this rule applies whether or not the information is personal data, and that a pre-ticked box is not valid consent.
The directive works through national laws, such as Article 82 of the French data protection act or Germany's TDDDG, and national regulators enforce them. The UK has its own versions in the UK GDPR and PECR.
Does browser fingerprinting fall under the ePrivacy consent rule?
In most setups, yes. Article 5(3) is written to be technology neutral. The Article 29 Working Party, the body that preceded the European Data Protection Board (EDPB), said in Opinion 9/2014 that device fingerprinting falls under it. The EDPB's Guidelines 2/2023 on the technical scope of Article 5(3), in their final 2024 version, take a broad view: a script that makes the browser report information about the device counts as gaining access to it. A JavaScript collector that reads screen, GPU, font or audio properties is likely in scope. See what browser fingerprinting is for what such scripts read.
So the practical question for bot protection is usually whether the strictly necessary exemption applies. Arguments that support it:
- The check protects a service the user is actively using, such as logging in, creating an account, submitting a form or paying.
- It is used only for security and fraud prevention.
- It collects only what that purpose needs.
The Working Party's Opinion 04/2012 on cookie consent exemptions treated user-centric security cookies, such as those used to detect repeated failed login attempts, as exempt. The French regulator CNIL lists trackers that secure an authentication mechanism among those that can be exempt from consent. The case is weaker for fingerprinting on every page view, for any use beyond security, or for sharing results with third parties for other purposes. Regulators do not all read the exemption the same way, and some read it narrowly.
Where does legitimate interest fit?
Under the GDPR, every processing of personal data needs a lawful basis in Article 6. For bot protection, the usual basis is legitimate interests, Article 6(1)(f). Recital 47 says processing strictly necessary for preventing fraud is a legitimate interest of the controller, and Recital 49 says the same for network and information security. You still have to run and document a balancing test: the interest, why the processing is necessary for it, and why it does not override the user's rights.
Legitimate interest answers the GDPR question only. It does not settle Article 5(3), which has its own consent rule and its own, narrower exemptions. The EDPB's Opinion 5/2019 on the interplay between the ePrivacy Directive and the GDPR says that where ePrivacy requires consent, a GDPR basis such as legitimate interest cannot replace it. Treat them as two separate checks, and document each.
Practical steps for privacy-friendly bot protection
- Limit the purpose. Use device and behaviour signals for security and fraud prevention only, write that limit into your vendor contract, and never reuse the data for advertising or analytics.
- Minimise the data. Collect the signals the detection needs and no more. Run the heavier checks on sensitive endpoints such as login, signup and checkout instead of every page. Hash or truncate identifiers where the detection still works.
- Set retention limits. Keep raw signals for a short period, and keep decisions and the evidence behind them only as long as you need for disputes and model updates. Write the periods down.
- Assess the risk. Article 35 requires a data protection impact assessment (DPIA) when processing is likely to result in a high risk. The DPIA guidelines endorsed by the EDPB list criteria such as systematic monitoring, scoring, large-scale processing and automated decisions; meeting two or more usually means a DPIA is needed. If an automated decision can block someone from a service, also check whether Article 22 on automated decision-making applies.
- Be transparent. Your privacy notice should name the security purpose, the categories of data, the provider, the retention period and the lawful basis. Your cookie or tracker notice should list the security check and the exemption you rely on.
- Get the vendor terms right. Sign processor terms under Article 28, check where data is processed, prefer EU data residency or a valid transfer mechanism under Chapter V, and review the sub-processor list.
- Give people a way out. A customer wrongly blocked should be able to reach a human, which also cuts the cost of false positives.
Raise data residency, retention and sub-processors with vendors early; how to choose bot protection has a full list of questions. The difference between fingerprinting a browser and recognising a device, which affects what you collect, is covered in device fingerprinting vs browser fingerprinting.
Common questions
Is browser fingerprinting legal?
In the EU it is regulated rather than banned. Reading device information falls under the ePrivacy rules and, when the data relates to a person, the GDPR, so you need consent or a clear fit with an exemption, plus a lawful basis for the processing. Laws outside the EU differ, and this is general information, not legal advice.
Do I need cookie consent for bot detection?
It depends on whether the check is strictly necessary for the service the visitor asked for. A check that protects a login or checkout the user is actively using has a stronger case than one that runs on every page or feeds analytics. National regulators read the exemption differently, so check the guidance in each country where you operate.
Is a device fingerprint personal data?
Often, yes. The GDPR treats online identifiers as personal data when they can be used to single out a person, alone or combined with other data such as an IP address or an account. A fingerprint built to recognise a returning device is designed to do that.