SimplyScan logoSimplyScan
What We ScanPricingFree ToolsBlogCreate AccountLog In
  1. Home
  2. Free Tools
  3. .gitignore Generator
Free Tool · Runs in your browser

Free .gitignore Generator

Pick your stack and get a ready .gitignore · with the .env and secret-file rules that keep credentials out of your repository.

100% client-side · nothing you enter is ever sent to a server or stored.

Preview · sign in with a free account to run it

Paste into a file named .gitignore at your repo root · already-tracked files need `git rm --cached` to stop being tracked.

How to use it

  1. Tick the stacks and tools you use: Env / secrets, Node, React / Vite, Next.js, Python, Go, Rust, macOS, Windows, JetBrains, VS Code.
  2. Copy the generated file to .gitignore in your repository root.
  3. Commit it before you create any .env file.

Example

Input

Env / secrets

Result

# Environment & secrets
.env
.env.*
!.env.example
*.pem
*.key
*.p12
*.pfx
credentials.json
service-account*.json

What the rules do

.env and .env.*
Keeps every environment file out of Git, including .env.local and .env.production.
!.env.example
Lets you commit a template with variable names and no values, so others know what to set.
*.pem, *.key, *.p12, *.pfx
Private keys and certificate bundles.
credentials.json, service-account*.json
Google Cloud and Firebase service-account keys, which give full project access.
Build and editor folders
node_modules, dist, .next, __pycache__, .idea and similar. They're large, change constantly and belong on each machine.

Go deeper

  • How to Remove Secrets from Environment Variables and Git History
  • Environment Variables Security: Stop Leaking Secrets to Production

Page updated 21 November 2026

Frequently asked questions

Why does .gitignore matter for security?

Because committed secrets are forever: even after deletion, .env files and keys remain in git history. Ignoring them from day one is the cheapest security control you'll ever add.

I already committed my .env · does adding it to .gitignore fix that?

No. The file stays in history and the secrets are compromised · rotate every credential it contained, then remove it with git filter-repo and add the ignore rule so it can't happen again.

I committed .env before adding .gitignore. Am I safe now?

No. .gitignore only affects files Git isn't tracking yet. Remove the file with git rm --cached .env, rotate every secret it contained, and clean it out of your history.

Want the full picture?

This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.

Run a full security scan

Related tools

Data URI Generator

Convert a file or image into a Base64 data URI · ready to inline into HTML, CSS, or JSON. The file is read locally and never uploaded.

Password Generator

Generate strong, cryptographically random passwords · choose the length and character sets, then copy with one click.

UUID Generator

Generate UUID v4 or time-ordered v7 identifiers · single or in bulk · using the browser's cryptographic random source.

SimplyScan logoSimplyScan

Security Scanner for Vibe-Coded Apps.

Product

See What We ScanHow It WorksView Pricing

Resources

Security BlogSecurity ChecklistTrust BadgeUptime MonitoringIntegrationsMCP Server (Claude, Cursor & Windsurf)API DocumentationBackend Audit GuideThreat Detection GuideFAQTerms of ServicePrivacy Policy

Platforms

All platforms →Lovable ScannerBolt.new ScannerCursor ScannerReplit Scannerv0.dev ScannerWindsurf ScannerBubble Scanner

Free Tools

All free tools →SSL CheckerSecurity HeadersDNS Security CheckerCORS TesterJWT DebuggerCSP EvaluatorHash GeneratorSEO Checker

Account

Create AccountLog In

© 2026 SimplyScan. All rights reserved.