Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Cookie Consent Banner Generator

  • Free
  • Runs in your browser
  • No account needed

This tool creates a single HTML+CSS+JavaScript snippet that shows a cookie banner with equal Accept and Reject buttons, a link to your cookie policy, layout and colours you choose, and it remembers the choice for 6 months.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Cookie Consent Banner Generator

This free tool builds a ready-to-use cookie consent banner you can paste into any site. You pick text, policy URL, layout (bar, box or centred) and colours. The generator outputs one HTML, CSS and JavaScript snippet that runs entirely in your browser. It stores the visitor choice in the browser for 6 months, can load analytics or ad scripts only after Accept, and can send Google Consent Mode v2 signals. No account or server is needed and nothing is uploaded. Sites that need a fast, local solution use it for testing, small sites, or DIY installs before moving to a full consent management platform. The tool also gives a live preview so you can test wording and position before you copy the snippet into your site.

How to use it

  1. 1Enter your cookie policy URL and edit the banner text.
  2. 2Choose layout, button labels and colours.
  3. 3Preview the banner and test Accept and Reject.
  4. 4Copy the single HTML/CSS/JS snippet and paste it into your site.
Advertisement

Worked example

Input: Privacy URL = https://example.com/privacy, Layout = bar bottom, Colours = #0055AA background and #FFFFFF text. Output: one copyable HTML+CSS+JS snippet. The banner shows Accept and Reject, links to your cookie policy, remembers the choice for 6 months, and will not load analytics until the visitor clicks Accept.

How it works

Makes a cookie consent banner as one HTML, CSS and JavaScript snippet with equally visible Accept and Reject buttons, a link to your cookie policy, bar, box or centred layout and your coloursIt remembers the choice in the browser for 6 months, can load analytics or ad scripts only after Accept, and can send Google Consent Mode v2 signalsLive previewNo outside service or accountWorks in the browser with nothing to install

Source: ICO guidance on cookies and similar technologiesGoogle Consent Mode v2 documentationGDPR text (Regulation 2016/679). Last checked 13 November 2026.

What it is good for

  • You get one paste-ready HTML/CSS/JS file that runs in the browser.
  • You can block analytics or ads until the visitor clicks Accept.
  • You get a live preview so you can test wording and position quickly.
  • This generator stores consent in the browser only and does not provide server-side logs or audits.
  • It will not automatically tag or scan third-party scripts; you must gate them or retag manually.
Advertisement

Questions people ask

Do I always need a cookie banner?

Not always. If your site sets only strictly necessary cookies, you may not need a banner under EU and UK guidance. If you set analytics or marketing cookies, you need prior consent for EU and UK visitors. See the ICO guidance.

Is a Reject button required?

Yes for EU and UK: rejecting must be as easy as accepting and visible on the same layer. The banner this tool creates shows equal Accept and Reject buttons to meet that requirement.

How does the tool stop analytics until I get consent?

The snippet defers loading analytics or ad scripts until the visitor clicks Accept. You must retag your tracking scripts or use the snippet to run scripts only after consent is recorded.

Where is consent stored and for how long?

The choice is stored in the visitor's browser for 6 months. This is a client-side record; if you need audit logs, keep server-side records.

Can the tool signal Google Consent Mode?

Yes. The snippet can send Google Consent Mode v2 signals so Google tags adjust behaviour according to the visitor's choice. Follow Google's developer guide when you retag.

Does this replace a full consent management platform?

No. This tool gives a simple, local banner and blocking mechanism. Large sites or regulated businesses may need a CMP that stores logs, manages vendors, and provides audits.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement