SEOlust logo SEOlust
Security & Privacy

Cookie Consent Banner Generator

Create a free, self-contained cookie consent banner — customise text, buttons, position and colours, preview live, and copy a snippet that remembers each visitor's choice. No plugins.

All tools

💡 How it works & what to know

  • Paste the snippet just before </body>. It stores the visitor's choice in a cookie and won't show again until it expires.
  • A visible Reject option that's as easy as Accept is expected under GDPR — keep it on for EU visitors.
  • This generates the banner UI and choice storage. You still need to actually gate your analytics/marketing scripts on the choice — see the notes below the snippet.

Free Cookie Consent Banner Generator

Create a lightweight cookie consent banner for your website — no plugins, no monthly fees, no external scripts. Customise the message, buttons, position and colours, preview it live, and copy a self-contained snippet that remembers each visitor's choice. Free, runs in your browser.

Why you need a consent banner

Privacy laws such as the EU's GDPR and ePrivacy rules, and similar regulations elsewhere, require that you tell visitors about non-essential cookies and get their agreement before setting them. A consent banner is how you ask. This generator builds a clean, fast banner you own outright — no third-party consent service loading scripts on every page.

How to use it

Design it visually, then paste it in:

  • Edit the message, button labels, position and accent colour.
  • Watch the live preview update as you type.
  • Copy the snippet and paste it just before your closing </body> tag.

It remembers each visitor's choice

The generated script stores the visitor's decision in a first-party cookie for the number of days you choose. On return visits the banner stays hidden, so people aren't nagged on every page. If they accepted, the snippet fires a <code>cookie-consent-accepted</code> event on each visit so your tracking can load again automatically.

Accept and Reject on equal footing

Under GDPR, refusing cookies must be as easy as accepting them — a banner with only an "Accept" button isn't compliant for EU visitors. That's why the Reject button is on by default and styled as a genuine, one-click choice. Keep it enabled unless you have a specific reason not to.

The important part: gate your tracking

A banner alone doesn't make you compliant — you must actually withhold analytics and marketing cookies until the visitor accepts. The snippet is built for this: it exposes the <code>cookie-consent-accepted</code> event and a stored choice, and includes commented placeholders showing exactly where to insert your Google Analytics, ad pixels or other scripts so they only run after consent.

Yours to keep, and private

Everything is generated in your browser — no account, no external dependency, and the banner adds essentially no page weight. Note this tool helps you implement consent but isn't legal advice; if you operate in a strict jurisdiction, review your final setup against the applicable rules. Pair it with our other privacy tools like the Privacy Policy and robots.txt generators.

FAQ

Is this cookie banner free?
Yes. It's completely free, generates a self-contained snippet, and needs no account or subscription.
Where do I paste the snippet?
Paste it just before the closing </body> tag on every page of your site (or in your shared template/footer).
Does it remember the visitor's choice?
Yes. It stores the decision in a first-party cookie for the number of days you set, so the banner won't reappear until it expires.
Does the banner make me GDPR compliant on its own?
No. You must also withhold non-essential cookies until consent. The snippet fires an event and exposes the stored choice so you can gate your analytics and marketing scripts on it.
Why is the Reject button on by default?
GDPR requires rejecting cookies to be as easy as accepting them. A one-click Reject keeps the banner fair and compliant for EU visitors.
Does it load any external scripts?
No. The banner is fully self-contained and adds negligible page weight — nothing is fetched from a third party.
Is this legal advice?
No. It helps you implement a consent banner, but you should review your final setup against the privacy laws that apply to your audience.

Related tools

Pro tip: pair this tool with Robots.txt Exposure Checker and Cookie Security Checker for a faster SEO workflow.