GDPR Cookie Banner Generator

Generate GDPR-compliant cookie consent banners. Customizable styles and text.

GDPR Cookie Consent Banner

Generate customizable GDPR-compliant cookie consent banners

Banner Settings

Generated HTML

<!-- GDPR Cookie Consent Banner -->
<div id="gdpr-banner" style="position: fixed; bottom: 0; left: 0; right: 0; padding: 20px; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 9999; display: none; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;">
  <div style="max-width: 1200px; margin: 0 auto;">
    <h3 style="margin: 0 0 10px 0; font-size: 18px; font-weight: 600; color: #1f2937;">
      🍪 Cookie Consent
    </h3>
    <p style="margin: 0 0 15px 0; font-size: 14px; color: #4b5563; line-height: 1.5;">
      We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. 
      By clicking "Accept All", you consent to our use of cookies. 
      <a href="/privacy-policy" style="color: #3B82F6; text-decoration: underline;">Learn more</a>
    </p>
    
    
    <div id="cookie-preferences" style="display: none; margin: 15px 0; padding: 15px; background: #f9fafb; border-radius: 8px;">
      <h4 style="margin: 0 0 10px 0; font-size: 14px; font-weight: 600; color: #1f2937;">Cookie Preferences</h4>
      <div style="display: flex; flex-direction: column; gap: 10px;">
        <label style="display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563;">
          <input type="checkbox" checked disabled style="width: 16px; height: 16px;">
          <span><strong>Necessary</strong> - Required for basic site functionality</span>
        </label>
        
        <label style="display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563;">
          <input type="checkbox" id="analytics-cookie" checked style="width: 16px; height: 16px;">
          <span><strong>Analytics</strong> - Help us understand how visitors use our site</span>
        </label>
        
        
        <label style="display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563;">
          <input type="checkbox" id="marketing-cookie" checked style="width: 16px; height: 16px;">
          <span><strong>Marketing</strong> - Used to track visitors across websites</span>
        </label>
        
        
        <label style="display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563;">
          <input type="checkbox" id="preferences-cookie" checked style="width: 16px; height: 16px;">
          <span><strong>Preferences</strong> - Remember your settings and preferences</span>
        </label>
        
      </div>
    </div>
    
    
    <div style="display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap;">
      <button id="accept-all-btn" style="padding: 10px 20px; background: #3B82F6; color: white; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; flex: 1; min-width: 120px;">
        Accept All
      </button>
      
      <button id="customize-btn" style="padding: 10px 20px; background: white; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; flex: 1; min-width: 120px;">
        Customize
      </button>
      <button id="save-preferences-btn" style="display: none; padding: 10px 20px; background: #3B82F6; color: white; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; flex: 1; min-width: 120px;">
        Save Preferences
      </button>
      
      <button id="reject-all-btn" style="padding: 10px 20px; background: white; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; flex: 1; min-width: 120px;">
        Reject All
      </button>
    </div>
  </div>
</div>

<script>
  (function() {
    const banner = document.getElementById('gdpr-banner');
    const acceptBtn = document.getElementById('accept-all-btn');
    const rejectBtn = document.getElementById('reject-all-btn');
    const customizeBtn = document.getElementById('customize-btn');
    const savePreferencesBtn = document.getElementById('save-preferences-btn');
    const preferences = document.getElementById('cookie-preferences');
    
    // Check if user has already made a choice
    if (!localStorage.getItem('gdpr-consent')) {
      banner.style.display = 'block';
    }
    
    acceptBtn?.addEventListener('click', function() {
      localStorage.setItem('gdpr-consent', JSON.stringify({
        necessary: true,
        analytics: true,
        marketing: true,
        preferences: true,
        timestamp: new Date().toISOString()
      }));
      banner.style.display = 'none';
      // Initialize your analytics/marketing scripts here
    });
    
    rejectBtn?.addEventListener('click', function() {
      localStorage.setItem('gdpr-consent', JSON.stringify({
        necessary: true,
        analytics: false,
        marketing: false,
        preferences: false,
        timestamp: new Date().toISOString()
      }));
      banner.style.display = 'none';
    });
    
    customizeBtn?.addEventListener('click', function() {
      preferences.style.display = 'block';
      customizeBtn.style.display = 'none';
      savePreferencesBtn.style.display = 'block';
    });
    
    savePreferencesBtn?.addEventListener('click', function() {
      const consent = {
        necessary: true,
        analytics: document.getElementById('analytics-cookie')?.checked || false,
        marketing: document.getElementById('marketing-cookie')?.checked || false,
        preferences: document.getElementById('preferences-cookie')?.checked || false,
        timestamp: new Date().toISOString()
      };
      localStorage.setItem('gdpr-consent', JSON.stringify(consent));
      banner.style.display = 'none';
      // Initialize scripts based on consent
    });
  })();
</script>

📋 Implementation: Copy the generated code and paste it just before the closing </body> tag in your HTML. Make sure to link to your actual privacy policy page and implement the cookie handling logic according to your needs.

GDPR Compliance Tips

  • Obtain consent before setting non-essential cookies
  • Provide clear information about cookie purposes
  • Allow users to withdraw consent easily
  • Keep records of user consent
  • Link to your privacy policy for detailed information

About GDPR Cookie Banner Generator

Generate GDPR-compliant cookie consent banners. Customizable styles and text. Privacy-focused tools to protect your sensitive data, generate secure passwords, and sanitize personal information. This gdpr cookie banner generator is completely free to use, works entirely in your browser, and requires no installation or sign-up. Perfect for developers, content creators, designers, and anyone who needs quick access to professional-grade tools. Simply enter your data, and get instant results. Your data never leaves your browser, ensuring complete privacy and security.

How to Use GDPR Cookie Banner Generator

  1. 1Open the GDPR Cookie Banner Generator tool on this page
  2. 2Enter or paste your content into the input field
  3. 3Adjust any available options or settings to customize the output
  4. 4Click the process/convert/generate button to see results
  5. 5Copy the output or download the result for use in your projects

Common Use Cases

  • Users protecting personal information
  • Developers implementing security measures
  • Organizations ensuring GDPR compliance
  • Individuals managing digital privacy

Frequently Asked Questions

Is the GDPR Cookie Banner Generator free to use?

Yes! Our GDPR Cookie Banner Generator is completely free with no hidden costs, subscriptions, or limitations. You can use it as many times as you need.

Do I need to create an account or sign up?

No account required! Simply visit the page and start using the GDPR Cookie Banner Generator immediately. No registration, no emails, no hassle.

Is my data safe and private?

Absolutely. All processing happens directly in your browser. Your data never leaves your device, and we don't store or track any of your content.

Can I use this GDPR Cookie Banner Generator on mobile devices?

Yes! Our GDPR Cookie Banner Generator is fully responsive and works perfectly on smartphones, tablets, and desktop computers. Use it anywhere, anytime.

Are there any file size limits?

While most tools have no strict limits, very large files may take longer to process depending on your device's capabilities. For best performance, we recommend keeping files under 10MB.