Free Cookie Consent Code Generator

Create a simple two-choice cookie banner. Preview it, then copy one self-contained code block.

Live preview

HomeProductsAboutContact

Banner settings

Wording

Appearance

700px
Applies on larger screens. On phones the panel automatically uses the available width.
10px

Behaviour and optional scripts

This code runs only after the visitor selects “Allow optional cookies”. Do not put essential website code here.
This generator cannot automatically identify existing tracking code elsewhere on a website. Remove or disable the original copy before adding it here.

Generated code

Installation

  1. Complete the settings and copy the generated code.
  2. Paste it immediately before the closing </body> tag on every page.
  3. Remove any original copy of scripts placed in the Optional Scripts box.
  4. Add a link that calls window.BasicCookieConsent.open() if visitors need to change their choice.
This is a technical tool, not legal advice. The website owner remains responsible for identifying their cookies and meeting the rules that apply to them.