Back to tools

GDPR Cookie Banner Generator

Create compliant cookie consent banners

Content

Button Text

Style

Preview

Your Website

We use cookies to enhance your browsing experience and analyze our traffic. By c...

Cookie SettingsReject AllAccept All

Generated Code

<!-- GDPR Cookie Banner -->
<div id="cookie-banner" style="
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background-color: #1a1a2e;
  color: #ffffff;
  padding: 20px 24px;
  
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
">
  <div style="flex: 1; min-width: 200px;">
    <p style="margin: 0;">
      We use cookies to enhance your browsing experience and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.
      <a href="/privacy-policy" style="color: #2bb1ea; text-decoration: underline;">Learn more</a>
    </p>
  </div>
  <div style="display: flex; gap: 10px; flex-wrap: wrap;">
    <button onclick="document.getElementById('cookie-banner').style.display='none'" style="
      background: transparent;
      border: 1px solid #ffffff40;
      color: #ffffff;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
    ">Cookie Settings</button>
    <button onclick="document.getElementById('cookie-banner').style.display='none';localStorage.setItem('cookies_rejected','true')" style="
      background: transparent;
      border: 1px solid #ffffff40;
      color: #ffffff;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
    ">Reject All</button>
    <button onclick="document.getElementById('cookie-banner').style.display='none';localStorage.setItem('cookies_accepted','true')" style="
      background: #2bb1ea;
      border: none;
      color: white;
      padding: 10px 24px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
    ">Accept All</button>
  </div>
</div>
<script>
  if(localStorage.getItem('cookies_accepted') || localStorage.getItem('cookies_rejected')) {
    document.getElementById('cookie-banner').style.display = 'none';
  }
</script>

GDPR Compliant Features:

  • Clear explanation of cookie usage
  • Link to privacy policy
  • Option to reject all cookies
  • Remembers user preference
  • Easy to customize and implement