Firebase Rules Generator

Craft secure & reliable rules for Firestore, Storage, and Realtime Database with an intuitive interface.

Join Our Community!

Stay updated with the latest features, get support, and connect with other developers on our Telegram channel.

Admin Permission Configuration
Customize how the "Admin Only" permission is checked for each service. These settings are saved with your configuration file.

This generates the rule: get(/databases/$(database)/documents/users/$(request.auth.uid)).data.isAdmin == true

AI Rule Suggester
Describe the rule you want in plain English, and let AI help you get started. (Experimental)

AI suggestions are experimental and may require adjustments. Always review carefully.

Applying a template will replace your current rule definitions for firestore.

Define Your Rules (1)

Rule for Path: /users/{userId}
Define access and validation for this specific path.

Use {variable} for Firestore/Storage or $variable for RTDB wildcards.

Using 'userId' from path for 'Owner Only' checks.

Generated Firestore Rules
Review and test these rules thoroughly before production.

Powerful Features, Simplified

Everything you need to craft robust Firebase security rules without the headache.

Rapid Rule Generation

Quickly generate complex Firebase rules for Firestore, Storage, and Realtime Database.

Security Focused

Emphasizes secure defaults like 'owner-only' access and robust validation options.

Highly Configurable

Customize paths, permissions, data types, validation (regex, min/max), and admin checks.

Real-time Preview

See your generated rules update instantly as you make changes in the UI.

Responsive Design

Use the generator seamlessly on any device, desktop or mobile.

Admin Permissions

Easily define and configure 'Admin Only' access with customizable checks.

Templates & Themes

Start with pre-built templates and enjoy light/dark mode for comfortable usage.

How It Works

Generating Firebase rules is a breeze with our intuitive interface.

1. Select Service & Define Paths

Choose Firestore, Storage, or Realtime DB. Add rule paths like 'users/{userId}'.

2. Configure Permissions & Validation

Set read/write permissions (public, owner, admin) and add data validation rules.

3. Customize Admin Checks (Optional)

Specify how 'Admin Only' access is verified for each service if defaults don't fit.

4. Generate & Use Rules

Copy or download your production-ready rules file and deploy it to Firebase.

About This Tool

The Firebase Rules Generator is a powerful, open-source tool designed to simplify the often complex task of writing secure and reliable Firebase Security Rules. Whether you're working with Cloud Firestore, Cloud Storage, or Realtime Database, this generator provides an intuitive interface to define paths, permissions, and data validations, helping you protect your application and user data effectively.

DK

Created by Dr King BD

Connect on Telegram