Cookie Consent Banner Generator
Build a lightweight cookie consent banner you can paste onto any website in seconds. Choose your categories, position, colour and language, then copy one self-contained snippet — HTML, CSS and JavaScript in a single block. It stores each visitor’s choice in their browser and gives a clear way to accept, reject, or manage cookies, which sits at the heart of PDPA and GDPR compliance.
Optional. Shown as a small heading above the message.
The consent text visitors see. Edit it freely — it appears exactly as you type.
Where the banner appears on your site.
Used for the primary “Accept” button and links.
Optional. Adds a link to your policy inside the banner.
Enter a valid http(s) URL, or leave it blank.
Language of the buttons and category labels in the generated banner.
Your banner preview will appear here
Enter a banner message on the left to generate your copy-paste snippet.
Live preview
Illustration only — options are shown expanded so you can see every category.
Generated code
Paste this once, just before the closing </body> tag on every page.
Consent is stored in the visitor’s browser (localStorage) and exposed as window.cookieConsent. This tool helps you build a banner but is not legal advice.
How to use
- Enter your site name and edit the consent message.
- Pick the cookie categories, banner position, accent colour and language.
- Watch the live preview on the right update as you change settings.
- Click “Copy code” and paste the snippet before the closing </body> tag on every page.
Features
- Self-contained HTML + CSS + JavaScript — no libraries or external requests
- Accept all, reject non-essential, and manage-by-category controls
- Necessary cookies locked on; analytics, marketing and preferences optional
- Three layouts: bottom bar, corner box, or centered modal
- Thai, English, or bilingual banner text
- Remembers consent in localStorage and exposes window.cookieConsent for your scripts