Free tool. Last reviewed: 7 November 2026.
Live preview
Click the buttons to try it. The preview forgets your choice when you change a setting.
1. Banner code
Paste this once, just before the closing </body> tag of every page.
2. Make your trackers wait for consent
Any script that sets non-essential cookies must not run until the visitor agrees. Change its tag like this, using the matching category. The banner switches it on only after consent:
Add a link in your footer so people can change their mind at any time, as easily as they gave consent:
3. Cookie policy text
Good practice to keep
- Do not pre-tick optional categories. Rejecting must be as easy as accepting, which is why both buttons look the same.
- Keep a record of when and how each visitor consented. The code above stores the choice and a timestamp in the visitor's browser. If you must prove consent later, log it on your server as well.
- Check your site with your browser's developer tools to confirm that no analytics or marketing cookies appear before the visitor accepts.
- Mention the cookies in your privacy notice.
Need a person to look at your problem?
Rouell, who runs this site, is a cyber security expert. He holds the EC-Council Certified Ethical Hacker (CEH) certification and is certified by the Maharashtra government as an ethical hacker. If a company has mishandled your data, or you are stuck dealing with one, he can help you work out a solution. Please use the contact form on rouell.com to get in touch. If you would like to see more tools or help on this site, please write in as well.