How to Write a Cookie Policy: Categories, Consent and Your Cookie List
What a website cookie policy must explain under the ePrivacy Directive, UK PECR and CCPA, how to find your cookies, and how to keep the policy up to date.

How to Write a Cookie Policy: Categories, Consent and Your Cookie List
Almost every website sets cookies, often more than its owner realises. Analytics, advertising pixels, embedded videos, payment widgets and security services all add their own. Privacy laws in Europe and elsewhere expect sites to tell visitors what these cookies are and to let them choose. This guide explains what a cookie policy needs and how to build one with the free cookie policy generator.
What cookies are
Cookies are small text files a website stores in the visitor's browser. First-party cookies are set by your own site, for example to keep a shopping cart. Third-party cookies are set by other services you use, such as an analytics or advertising provider. Similar technologies, including local storage, pixels and device fingerprinting, are generally treated the same way by the law.
What the law expects
EU and EEA: Article 5(3) of the ePrivacy Directive requires consent before storing or reading information on a user's device, unless it is strictly necessary for a service the user asked for. Where cookies process personal data, the GDPR also applies.
United Kingdom: The Privacy and Electronic Communications Regulations (PECR) contain the same rule, and the Information Commissioner's Office expects clear information and consent that is as easy to refuse as to give.
California: The CCPA, as amended by the CPRA, gives residents rights to know, delete and correct personal information and to opt out of its sale or sharing for cross-context behavioural advertising. Advertising cookies can fall into "sharing".
Brazil: The LGPD gives similar rights and requires a legal basis such as consent.
The four categories
Policies usually group cookies into:
- Strictly necessary: security, load balancing, sessions, remembering consent. No consent needed under EU and UK rules.
- Preferences: language, region, display choices.
- Analytics and performance: visitor counts and behaviour, such as Google Analytics.
- Marketing and advertising: retargeting and conversion tracking, such as Meta Pixel and Google Ads.
Only the first category can be set before consent in the EU and UK.
Find out what your site sets
You cannot describe cookies you do not know about. A simple audit:
- Open your website in a private browser window.
- Accept all cookies in your banner and browse several pages, including checkout or contact forms.
- Open the developer tools (F12) and look under Application (Chrome) or Storage (Firefox) for cookies and local storage.
- Copy the names, or run
document.cookiein the console and copy the output.
Paste the names into the generator's "Find my cookies" tab. Common cookies such as _ga, _ga_ followed by an ID, _gid, _gcl_au, _fbp, Hotjar, Stripe and Cloudflare cookies are recognised automatically; others are added for you to describe. Only paste names, never values: cookie values can work like passwords.
Describe each cookie
For every cookie, the policy lists its name, provider, category, purpose, duration and whether it is first- or third-party. The generator turns your list into a table inside the policy. Check durations and purposes against each provider's documentation, as they change over time.
The rest of the policy
Beyond the table, the generated policy explains what cookies are, how you use each category, how visitors can accept, refuse or withdraw consent, region-specific rights, how to block cookies in the browser, how the policy is updated and how to contact you.
Publish and maintain it
Download the policy as HTML or Markdown for your website, link it from the cookie banner and the site footer, and keep the "last updated" date current. Review it whenever you add a plugin, analytics service or advertising tag. Most importantly, make sure your banner actually blocks non-essential cookies until consent is given: a policy cannot fix a banner that does not work.
Limits
The generator produces a template from your answers. It is not legal advice, does not scan your site automatically and does not set up a consent mechanism. For sites with significant personal data, many jurisdictions or advertising revenue, ask a qualified privacy adviser to review the result.



%20Without%20Uploading%20Anything&c=%230f766e&k=security)