About

A free consent banner, made for India

consentbar helps websites in India ask for consent the way the DPDP Act expects: clearly, purpose by purpose, in the user's own language, with an easy way to change their mind.

Why it exists

India has a new data protection law

The Digital Personal Data Protection (DPDP) Act, 2023 and the DPDP Rules, 2025 change how websites and apps in India may use personal data. Most of the duties for companies start in 2027.

Most consent banners were built for Europe's GDPR and its cookie categories. The DPDP Act asks for some different things:

  • Consent for each purpose, such as analytics or marketing, not just "accept cookies".
  • A notice in English or any of the 22 languages of the Eighth Schedule of the Constitution.
  • Withdrawing consent must be as easy as giving it.
  • Contact details for complaints, and how to reach the Data Protection Board.

consentbar was built for exactly these needs, and it is free for everyone, from a small shop to a large company.

How it is built

Small, private and honest

Privacy first

consentbar never sends data anywhere unless you set recordEndpoint. No tracking, no analytics, no outside fonts.

No dependencies

One small package, about 19 KB compressed with all languages. Nothing else to install, update or audit.

Accessible

Works with a keyboard and screen readers. Colours meet WCAG AA contrast in light and dark mode.

Open source

MIT licensed and free for any project, including commercial ones. The code is on GitHub.

Honest

It helps you follow the DPDP consent rules. It never claims to make you compliant, and it says clearly what it does not do.

Works everywhere

Plain HTML, WordPress, Vue, Svelte, React and Next.js. Use a script tag or npm.

Languages

23 languages, and help is welcome

consentbar includes English and all 22 languages of the Eighth Schedule. Urdu, Kashmiri and Sindhi are shown right to left.

The texts were written with care, but no native speaker has reviewed them yet. Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Urdu, Odia and Nepali are in better shape. Bodo, Dogri, Kashmiri, Konkani, Maithili, Manipuri, Santali and Sanskrit need the most work.

Before you go live, ask a native speaker to check the languages you use. You can change any text with the texts option.

Do you speak one of these languages? A short review helps every website that uses consentbar. Open an issue on GitHub with your corrections.

Who makes it

An independent open-source project

consentbar is made by CK, an independent developer who builds small, dependency-free tools for JavaScript and TypeScript. It is not backed by a company and it has no paid plan.

Found a bug or have an idea? Open an issue. You can see the other packages on GitHub and npm.

This website

What this site loads

A privacy tool should be clear about its own website.

Trackers
None. No analytics and no ads.
Cookies
One, consentbar_demo, only on the demo page. It holds your demo choices and stays in your browser.
Local storage
The demo keeps your example consent records in this browser only.
Outside requests
The demo page loads consentbar from the jsDelivr CDN and asks jsDelivr for the latest version number. This About page loads nothing from outside.
Fonts
Your device's own fonts. The Santali font is served from this site.