Cookie Banner Generator

Generate the HTML, CSS, and JavaScript for a simple cookie consent banner that you can copy-paste into your site to offer an “Accept / Decline” choice, with the visitor’s choice remembered in their browser. All the code is built locally, with no server.

Ce site utilise des cookies pour améliorer votre expérience. En continuant votre navigation, vous acceptez leur utilisation.
Copy-paste code

How it works

Customize the message, button labels, and colors, preview the result, then copy the complete HTML/CSS/JS block into your site: paste it just before the closing </body> tag of your page. The script stores the visitor’s choice in their browser’s local storage so the banner doesn’t reappear once they’ve answered.

Is this banner enough for GDPR compliance?

This generator provides a functional technical foundation (display, choice, storage), but actual compliance also depends on what you do with cookies: non-essential cookies (analytics, advertising) must stay disabled until the user clicks “Accept”. Adapt the “TODO” comment in the generated JavaScript to activate your scripts only after consent, and consult a legal professional if your site handles sensitive data.

Can I modify the generated code after copying it?

Yes. The code is a standard starting point that requires no external dependencies or framework: you can freely adapt it to your site’s visual identity or integrate it into an existing component.

The code is generated entirely in your browser: none of your information is sent to an external server.