Cookie consent banner generator

Customize a GDPR-style cookie banner — message, button labels, colours, position and policy link. See it live, then copy a self-contained HTML+CSS+JS snippet that remembers the visitor’s choice.

Text
Banner message
Accept button
Reject button
Policy link text
Policy link URL
Appearance
Position
Layout
Banner background
Text colour
Accept button
Accept text
Corner radius14px
Live preview

This is exactly how it appears on a page. Click Accept or Reject to test, then reset.

Your code

Paste this snippet just before the closing tag of every page. It shows once, then remembers the choice in the visitor’s browser (localStorage).

Everything runs in your browser. No upload, no sign-up.

How it works

STEP 1

Write your message

Set the banner text, the Accept and Reject labels, and link to your privacy or cookie policy.

STEP 2

Style it to match

Pick the position, colours and corner radius. The live preview updates as you type.

STEP 3

Copy & paste

Copy the self-contained snippet into your site before </body>. It remembers the choice in localStorage — nothing is uploaded.