🍪 Free Cookie Consent Banner Generator
Create a fully GDPR and UK PECR compliant cookie consent banner in seconds. Easy HTML/JS copy-paste integration.
Why You Need a Compliant Cookie Banner
If your website uses Google Analytics, Facebook Pixel, Google AdSense, or third-party embedded videos, you are placing "non-essential" tracking cookies on your visitors' devices. Global laws regulate how you must handle this.
- EU GDPR & ePrivacy Directive: The strictest laws globally. You cannot load tracking scripts until a user explicitly clicks "Accept" on a cookie banner. Pre-ticked boxes are illegal.
- UK PECR compliance: The UK's Information Commissioner's Office (ICO) actively penalizes websites that do not offer an equally prominent "Reject All" button next to "Accept All".
- AdSense & Analytics Access: Google has begun enforcing Google Consent Mode v2 in 2026. Without a valid cookie banner capturing verified consent, your analytics data and ad revenue will be blocked.
- Build User Trust: Transparently showing users exactly what they are opting into builds professional credibility and respect for their digital privacy.
Frequently Asked Questions
Is a cookie banner required by law?
Yes, if you have any visitors from the EU or the UK. The GDPR and ePrivacy Directive require explicit consent before placing non-essential tracking cookies on a user's device.
Does this banner work on WordPress or Shopify?
Yes. Our generator creates lightweight, raw HTML/JS code that you can copy and paste directly into the header or footer of any CMS platform without installing bloated plugins.
Is implied consent ("By continuing to browse...") enough?
No. The highest European courts have ruled that "implied consent" banners are invalid. A user must take an active, deliberate action to provide consent, such as clicking an "Accept" button.
What the generator asks you
This generator produces code, not a policy. You set the banner text, the accept-button text, the banner position, background and text colours for the banner and button, the text and URL of the link to your cookie policy, and optionally a decline button with its own label. It outputs an HTML snippet with inline styles and a small script that you paste into your site before the closing body tag.
What the finished document covers
- A fixed banner element with your text and colours
- An accept button and an optional decline button
- A link to your cookie or privacy policy
- A script that shows the banner only until a choice is made
- The choice is remembered in the browser's localStorage
What it does not do
The snippet records the visitor's choice as true or false in localStorage and hides the banner; it does not block or load any cookies or scripts based on that choice, so wiring the decision to your analytics or advertising tags is still your job. There is no per-category consent (necessary, analytics, marketing), no consent log, and no geolocation, so it does not on its own satisfy GDPR or ePrivacy consent requirements. It is plain HTML and JavaScript you can edit freely.
Documents you may need next
- Cookie Policy Generator — A banner should link to a cookie policy that lists what you set and why.
- Privacy Policy Generator — Consent is one part of GDPR; the privacy policy covers the rest.
- Accessibility Statement Generator — Banners are a common accessibility failure; publish what you support.