Cookie Consent Banner Generator
Add a cookie banner that asks before tracking — with code you host yourself.
- Your data never leaves your device
- 100% free
- No sign-up
- Works offline after first load
How to create a cookie consent banner
- Choose the layout, colours, language and buttons.
- Pick the cookie categories and Consent Mode.
- Copy the snippet into your site and mark your tracking scripts.
About Cookie Consent Generator
Build a GDPR-style cookie consent banner.
It works in your browser for speed and privacy, remembers your settings on this device, and every result can be copied, downloaded or shared.
Good for
- Websites with Google Analytics or Ads
- Shops and blogs serving EU / UK visitors
- Replacing paid consent platforms
Tip: Put a “Cookie settings” link in your footer that calls CookieConsent.show().
Frequently asked questions
Is the banner GDPR compliant?
It provides what regulators expect: no non-essential cookies before consent, Reject as easy as Accept, granular categories, a way to change your mind and a stored record of the choice. Full compliance also depends on your site and policy.
What is Google Consent Mode v2?
Google’s way for tags to respect consent. It has been required for Google Ads and Analytics features in the EEA and UK since March 2024. The snippet sets the defaults to “denied” and updates them when the visitor chooses.
How do I block scripts until consent?
Change the script’s type to text/plain and add data-category="analytics" (or marketing / preferences). The banner runs it only after the visitor accepts that category.
Does it load anything from another server?
No — the banner is plain HTML, CSS and JavaScript you host yourself, with no tracking and no external requests.
Is my site's information uploaded?
No. The banner and its code are generated in your browser.