Guide · 2026-10-16

Is it safe to expose your Firebase API key?

Yes, the Firebase apiKey in your web config is meant to be public. It identifies your project; it doesn't grant access on its own. Every Firebase web app ships it to the browser.

What actually protects your data

What to check before launch

  1. Open your Security Rules and make sure no collection with user data allows open reads or writes.
  2. Make sure test-mode rules are gone; they expire, but some people extend them.
  3. In Google Cloud Console, restrict the browser key to your domains as an extra layer.

The things you should never ship to the browser are service account JSON files and Admin SDK credentials. Those are full admin access.

Check your site in 10 seconds

Free scan for leaked API keys, exposed .env files, link previews, SEO basics and security headers.