Free cookie consent banner generator (DPDP and Consent Mode v2)
Create a fair cookie banner with Accept, Reject and Choose, in English, Tamil and Hindi. It blocks trackers until people agree and sends choices to Google tags. Self-hosted: no page-view limits, no branding.
This tool needs JavaScript. Please turn it on, or open the page in a current browser.
How to use this tool
- Pick your cookie types Tick the categories your site uses: analytics, marketing, preferences. Necessary cookies are always on.
- Style the banner Choose position, colours and languages. The preview shows exactly what visitors will see.
- Copy the code Paste the code in the <head> of every page, before your trackers.
- Make trackers wait Change tracker scripts to type="text/plain" with data-consent. They run only after consent.
- Test it Open your site in a private window, click Reject, and check that trackers do not load. Use “Cookie settings” to change your choice.
A fair banner
- Make “Reject all” as easy as “Accept all”. Do not hide it.
- Do not pre-tick optional categories.
- Keep a “Cookie settings” link on every page so people can change their mind (DPDP: withdrawal as easy as consent).
Blocking that really works
- Load trackers only after consent; a banner that only shows a message is not enough.
- For YouTube and Maps embeds, use data-src so they load after consent, or use youtube-nocookie.com.
- After changes, test with your browser’s developer tools (Network tab) or our Tag Checker.
Keep it in sync
- List the same categories and tools in your privacy policy.
- When you add a new tracker, bump the version so everyone is asked again.
- Show the banner in the language of the page.
Questions about this tool
Is a cookie banner required in India?
India has no separate cookie law, but the DPDP Act needs clear, informed consent for personal data used for things like ads and analytics, with easy withdrawal. A fair banner is how websites usually do this.
What is Google Consent Mode v2?
A way to tell Google tags whether people allowed ads and analytics storage. This banner sends “denied” by default and updates it when people choose.
Are there page-view limits?
No. The code runs on your own site. There are no limits and no branding.
Does it work on WordPress or Shopify?
Yes. Paste the code in your theme’s head section (WordPress: a header code plugin or theme file; Shopify: theme.liquid).
Does the banner track anyone?
No. It stores only the visitor’s choice in a first-party cookie on your site and makes no outside requests.