Cookie consent that can actually block scripts.

SafeBanner is an open-source cookie consent banner for indie developers and agencies. Free gives you the banner and Google Consent Mode v2. Pro stops marked analytics and marketing scripts from running before the visitor says yes.

One script tag. No account. No hosted consent database. MIT licensed.

Google Consent Mode v2Open source on GitHubUnder 10kb gzippedNo account neededMIT Licensed
Configure & try it liveFull demo →
<script src="https://cdn.jsdelivr.net/npm/safebanner/dist/safebanner.js"></script>

Using SafeBanner on a client or production site?

Pro stops marked analytics and marketing scripts from running before consent.

Convinced? Get the license key for production and client sites.

Get my license key — $15/mo

What SafeBanner actually does

It shows a cookie banner, stores the visitor's choice in their browser, and sends Google Consent Mode v2 signals automatically. If you upgrade, SafeBanner can also hold marked analytics and marketing scripts until consent is granted.

Live in 5 minutes.

1

Add one script tag

No build step. Works with any stack.

2

Customize if you want

Colors, position, text. Or use defaults.

3

Consent is live

Consent stored. Google signals sent automatically.

Built for indie devs and agencies who want control without CMP bloat.

Open source

Audit the code yourself. No black boxes.

Lightweight

Under 10kb gzipped. No external dependencies.

Actually works

Opt-in by default for non-essential categories. Consent persists. Google gets the signal. Pro can stop marked scripts before approval.

No account required

Free tier runs entirely client-side.

Why teams switch

Founder note

“I built SafeBanner because the choices were either bloated enterprise CMPs or abandoned cookie banners. This gives you the small, understandable version that developers actually want to ship.”

Open source code, live demo, and docs are all public before you pay.

What SafeBanner covers

  • Consent banner with Accept All / Reject All
  • Google Consent Mode v2 signals
  • Block marked scripts until consent (Pro)
  • Consent expiry and re-prompting (Pro)
  • Cookie cleanup on rejection
  • Opt-in by default for non-essential categories
  • Multi-language support (EN/FR/DE + 40 more with Pro)
  • onConsentChange() callback API

Intentionally simple

SafeBanner handles consent UI and script blocking. It doesn't:

  • Manage vendors or IAB TCF strings
  • Store hosted consent records
  • Act as your legal system of record

SafeBanner manages consent on the site itself. No hosted consent records, no data processor relationship, no subprocessor complexity.

You stay in control. SafeBanner exposes consent state via API. Check hasConsentFor('analytics') before loading your trackers, or use Pro script blocking to activate marked scripts after consent.

Free shows the banner. Pro stops marked scripts from running before consent.

Built for indie developers and agencies who want OneTrust-level enforcement without the OneTrust bill. Free gives you a working banner with Google Consent Mode v2. Pro adds actual script blocking, consent expiry, and cookie cleanup.

Free

Consent UI

$0

  • Scripts still run unless you gate them yourself
  • Cookie consent banner + UI
  • Google Consent Mode v2 signals
  • onConsentChange() callback API
  • Custom color, position, and theme
  • English, French, German
  • Powered by SafeBanner badge
Install Free

Pro

Consent enforcement

$15/mo

  • Everything in Free, plus:
  • Block marked scripts until consent is granted
  • Re-prompt after consent expires
  • Clean up accessible cookies on rejection
  • Production/client license key
  • No SafeBanner branding
  • Logo, layouts, custom labels
  • Auto dark/light theme
  • 40+ additional languages
Get my license key

What if I'm audited?

SafeBanner helps you capture consent choices and send Google Consent Mode v2 signals, but it is not legal advice and it does not act as your hosted system of record. Consent stays on the site itself, not in a SafeBanner dashboard.

FAQ

Is this really free?

Yes. Free gives you a working consent banner with Google Consent Mode v2 — no limits, no account. Pro ($15/mo) can block marked analytics and marketing scripts until approval, re-prompt after expiry, remove branding, and customize everything. Nothing in Free stops working if you never upgrade.

Will this break my existing Google Analytics setup?

No code changes are required for Free beyond adding the SafeBanner script before your Google tags. For Pro script blocking, you only mark the scripts you want SafeBanner to hold until consent.

Can I self-host?

Yes. MIT license. Run it on your own infra.

Does this work with React/Next/WordPress/etc?

Yes. It's a single script tag. Works everywhere.

What happens if I cancel Pro?

Your subscription stops renewing. SafeBanner Free still works as the banner and consent-signaling layer. Pro-only features like license-gated script blocking and branding removal require an active subscription.

What if I'm audited?

Consent is stored in the user's browser. SafeBanner does not store hosted consent records or act as a compliance system of record — that keeps your setup simple and your liability low. If you need server-side audit trails, your own backend is the right place to capture and own that data.

See it work, then install it in minutes.

Start with the live demo if you're comparing options. Install Free if you just need the banner. Upgrade when you need actual script blocking.