Home / Blog

How-to

How to Write a Cookie Policy, Step by Step

13 min readBy the ClearCrumb team

To write a cookie policy, list every cookie and similar technology your website uses, say what each one does, who sets it and how long it lasts, explain how visitors give and withdraw consent, and set out their rights under the laws that apply to them. This guide is for website owners, shop owners and agencies with visitors in the EU, the UK or the United States who want to write a cookie policy that is accurate, readable and easy to keep up to date.

What is a cookie policy, and do you need one?

A cookie policy is a page that tells visitors which cookies and similar technologies a website stores on or reads from their device, why, who receives the data and how they can change their choice. “Similar technologies” matters: local storage, tracking pixels, device fingerprinting and SDKs are covered in the same way as classic cookies.

It is not the same as a privacy policy. The privacy policy covers all the personal data you handle, from contact forms to orders. The cookie policy zooms in on what happens in the visitor’s browser. Many sites keep it as a separate page linked from the cookie banner and the footer; others put it in a clearly titled section of the privacy policy.

If your site has visitors from the EU or the UK and sets any cookie at all, you need this information somewhere. In the United States the rules are framed differently, but a site that uses advertising or analytics partners still has to explain them and offer an opt-out. Put simply: if a script on your site touches a visitor’s device, you should write a cookie policy that describes it.

What the law asks for when you write a cookie policy

No single law tells you exactly how to write a cookie policy. Several laws together decide what the page has to say. The table below sums them up; facts checked October 2026.

Region Rule What it means for the policy
EU and EEA ePrivacy Directive, Article 5(3) Storing or reading information on a device needs consent, after “clear and comprehensive information” about the purposes. Only strictly necessary storage is exempt.
EU and EEA GDPR, Article 13 Where cookies collect personal data: who you are, contact details, purposes, legal basis, recipients, transfers outside the EU, retention, rights, how to withdraw consent and how to complain.
United Kingdom PECR and UK GDPR Same idea as the EU: clear information and consent for non-essential cookies. The ICO’s guidance explains the details.
France CNIL guidelines and recommendation on cookies Purposes stated before consent, the list of companies that receive data available, and refusing as easy as accepting.
California CCPA/CPRA and its regulations No separate cookie policy required; the privacy policy explains sale, sharing and rights, and opt-out signals such as Global Privacy Control must be honoured.

The text of Article 5(3) is in the ePrivacy Directive on EUR-Lex. For UK visitors, the ICO’s guidance on cookies and similar technologies is the most practical reference, and it is worth re-reading now and then because the UK has been adjusting some of its cookie exemptions.

In the US, California’s regulations (California Code of Regulations, title 11, section 7025) cover opt-out preference signals, and other state laws have similar rules with their own thresholds and start dates. Our Global Privacy Control guide explains which states point to the signal.

Write a cookie policy: what EU and UK visitors need compared with what US visitors need
The same policy, read through two sets of rules.

What to gather before you write a cookie policy

The hard part is not the wording. It is knowing what your site really loads. A policy written from memory almost always misses a widget, an embed or a font served from another company. Before you write a cookie policy, collect these facts:

  • Your details. The legal name of the site owner, the website address and an email address for privacy questions.
  • Your audience. Where your visitors come from. EU, UK and US visitors each bring their own rules, and many sites have all three.
  • Every service that sets cookies or reads the device. Analytics, advertising pixels, video and map embeds, chat, forms with spam protection, payment providers, fonts.
  • For each service: the provider, the cookie names, what they are for, how long they last and the provider’s own privacy policy.
  • How your banner works. Which buttons it shows, where visitors can change their mind later, and whether it honours Global Privacy Control.

The quickest way to build the list of services is to look at what a first-time visitor’s browser receives. The free Cookie Banner Checker reads a page and lists the services it finds, including the ones that load before consent. Your browser’s developer tools (Application tab for cookies and storage, Network tab for requests) show the rest. Check a few page types, not only the home page: a blog post, a product page, the contact page and the checkout often load different scripts.

How to write a cookie policy in 7 steps

With the facts in front of you, the writing itself follows a fixed order. This is the method we use to write a cookie policy for a typical WordPress site or shop:

  1. Open with who you are. Name the site owner and the website, and give a contact for privacy questions. One or two sentences are enough.
  2. Explain what cookies are. A short, plain paragraph about files and similar technologies on the device.
  3. Group your services into categories. Use four: strictly necessary, preferences, statistics and marketing. These match what most banners show, so the policy and the banner use the same words.
  4. Add a table per category. One row per service with the service, the provider, the cookies it sets and a link to its privacy policy. Add the duration where you know it.
  5. Describe how consent works. What the banner asks, that nothing optional runs before a yes (for EU and UK visitors), and how to withdraw consent at any time. For US visitors, name the “Do not sell or share” link and Global Privacy Control.
  6. List the rights per region. EU, UK and US visitors have different rights and different regulators. Name the law and the rights for each region you serve.
  7. Close with contact and a date. Repeat the privacy contact and add a “Last updated” date.

When you write a cookie policy, keep sentences short and avoid legal filler: the ICO and the CNIL both expect the information to be clear to an ordinary visitor. If a sentence needs reading twice, rewrite it.

How to write a cookie policy: list services, sort by category, describe consent, list rights, date it
Five steps to write a cookie policy from the services on your site.

What each section of the policy should say

When you write a cookie policy, six sections cover what a visitor, or a regulator, is likely to ask.

What are cookies

Two or three sentences. Say that cookies are small text files a website stores in the browser, and that the policy also covers similar technologies such as local storage and pixels. Mention that some are set by your site and some by other companies’ services.

How we use cookies

This is the core of the page. Give each category a short explanation and a table. The categories below are the ones most banners and regulators recognise:

Category Typical services EU and UK visitors US visitors
Strictly necessary Login, cart, security, the consent choice itself No consent needed, but still listed Listed
Preferences Language, region, saved settings Consent needed unless the visitor asked for the feature Listed
Statistics Analytics such as Google Analytics 4 Consent needed Listed; opt-out if data is sold or shared
Marketing Ad pixels, retargeting, some video embeds Consent needed Opt-out of sale and sharing, GPC honoured

For each service, the table row should name the service, the provider, the cookies it sets and a link to the provider’s privacy policy. That link lets visitors read how the provider itself uses the data.

Managing your consent

Tell visitors how they make their choice and how they change it later. Name the button or link that reopens the cookie settings, and say that withdrawing consent is as easy as giving it. For US visitors, say where the “Do not sell or share my personal information” link is and that the site treats a Global Privacy Control signal as an opt-out. Only write this if your banner really does it.

Your rights

List the rights per region. EU visitors have rights under the GDPR to access, correct and erase their data, to data portability, to object and to complain to a data protection authority. UK visitors have similar rights under the UK GDPR and can complain to the ICO. California residents can ask to know, delete and correct personal information and opt out of its sale or sharing.

Contact

Give the privacy email address, a postal address if you have one, and any data protection officer or EU or UK representative.

Last updated

End with the date of the last change, written out in full. Update it every time you add or remove a service. An old date tells visitors that nobody has looked at the page since.

Write a cookie policy with the free generator

If you would rather not write a cookie policy from a blank page, the free Cookie Policy Generator does the structure for you. It follows the same seven steps and the same six sections described above, and builds the cookie table for each category from a library of 155 known services. It works in four steps:

  1. Business. Enter the site owner, the website, a privacy contact email and the date.
  2. Visitors. Tick the regions you serve: EU and EEA, United Kingdom, United States (CCPA/CPRA) or worldwide. You can tick several at once, and the policy then names each law and lists the rights per region.
  3. Services. Search the library and tick what you use, or paste your page source and let the generator tick the services it recognises. Providers, cookies and privacy links fill in for you.
  4. Export. Copy the HTML, download an .html file or Markdown, or print the policy as a PDF.

The output has the six sections described above, with the “Do not sell or share” link and Global Privacy Control for US visitors. An optional “Generated with ClearCrumb” line at the end is off by default.

The generator runs entirely in your browser. Nothing you type is sent to ClearCrumb; your draft is saved in your own browser so you can come back to it, and clearing your browser data removes it.

Write a cookie policy with the free generator: business, visitors, services, export
Write a cookie policy in four steps with the generator.

A generated draft is a starting point. Read it through, change anything that does not match your site, and ask a lawyer to review it if you process sensitive data such as health information, sell personal information or run a large site. A generator describes what you tell it: if a service is missing from your list, it is missing from the policy.

Keeping the policy current on WordPress

However you write a cookie policy, it starts to age the day you publish it. Every new plugin, embed or marketing tag can add a service that the page does not mention. A copied policy needs a manual update each time; that is the main weakness of any static text, generated or hand-written.

On WordPress, the free ClearCrumb plugin on WordPress.org solves this with the [clearcrumb_cookie_policy] shortcode (or the Cookie policy block). The policy is built from the services on the plugin’s Services & cookies screen, so when you add or remove a service, or run the scanner, the policy page changes with it. It comes in English, German, French, Dutch, Spanish and Italian and follows the site language. The blocks and shortcodes guide shows how to add it, together with the [clearcrumb_preferences] link that reopens the cookie settings.

To be fair about the trade-off: if your site is not on WordPress and you change tags every week, a hosted policy service that rescans your site and updates the text automatically may suit you better than a static page. For most small and medium sites, a generated policy plus a check after each change is enough.

Common mistakes when you write a cookie policy

Mistake What happens Fix
Copying another site’s policy The policy lists services you do not use and misses those you do. Start from your own list of services.
Only cookies, no other technologies Pixels, local storage and fingerprinting go unmentioned. Say the policy covers similar technologies and list them.
Promising what the banner does not do The policy says “nothing runs before consent” while a pixel loads early. Test the banner, then describe what really happens.
No way to change the choice Visitors cannot withdraw consent as easily as they gave it. Link a cookie settings button in the policy and footer.
Never updated New services are missing; the date gives it away. Update after every new plugin or tag and change the date.

The third mistake is the most serious: once you write a cookie policy, it is a promise. If it says marketing cookies wait for consent and they do not, the page itself becomes evidence that the site knew the rule and broke it.

How to check your site after you write a cookie policy

Once the policy is live, compare it with what the site really does. It takes ten minutes:

  1. Run the checker. Enter your page address in the Cookie Banner Checker and compare its list of services with the tables in your policy.
  2. Open the site as a new visitor. Use a private window, do not click the banner, and look at the Application and Network tabs in your browser’s developer tools. Nothing from the statistics or marketing tables should appear yet.
  3. Accept, then reject. Accept all and confirm the listed services load; then reopen the cookie settings, reject and reload.
  4. Check the links. The banner and the footer should both link to the policy, and the policy should link to the cookie settings.

On WordPress with ClearCrumb, the plugin’s Leak Test does the first two checks for you. Our guide to the cookie banner leak test explains how to read it.

Frequently asked questions

Do I need to write a cookie policy if I only use necessary cookies?

Strictly necessary cookies do not need consent in the EU or the UK, but you still have to be open about them. A short policy that lists them is the simplest way, and it is ready when you add analytics later.

Can I write a cookie policy myself, or do I need a lawyer?

Many small sites write a cookie policy themselves or start from a generator. Ask a lawyer if you process sensitive data, sell or share personal information, or run a large site with many partners.

Is a cookie policy the same as a privacy policy?

No. The privacy policy covers all the personal data you handle. The cookie policy covers what is stored on or read from the visitor’s device. You can combine them, as long as the cookie part is easy to find.

How often should I update my cookie policy?

Every time a service changes: a new plugin, embed, pixel or analytics tool. Change the “Last updated” date with each update, and check the whole page at least once or twice a year.

Does the Cookie Policy Generator store what I enter?

No. It runs in your browser and sends nothing to ClearCrumb. The draft is kept in your own browser storage until you clear it.

Summary

To write a cookie policy, start from what your site really loads, sort the services into four categories with a table for each, explain how consent is given and withdrawn, list the rights per region and date the page. The Cookie Policy Generator builds that structure for EU, UK and US visitors in four steps; on WordPress, the free ClearCrumb plugin keeps it current with a shortcode. Check the result against your site after every change.

This article explains how a cookie policy works. It is not legal advice and a policy alone does not make a site compliant; ask a lawyer about your own situation.

Free on WordPress.org.

Consent Mode v2, Leak Test, GPC and a consent log, all in the free plugin.