.gitignore Generator

Generate a .gitignore by ticking your languages and frameworks — Node, Python, Go, Java, Rust, React, Vue, Docker, Terraform and iOS. Runs in your browser.

Select templates

Choose one language/framework — templates are merged together. All templates bundled locally.

Output — .gitignore
—

About .gitignore Generator

A .gitignore file tells Git which files and directories to leave untracked, so generated artifacts and local environment files never end up in your repository. This tool builds one from maintained community templates instead of hand-writing ignore rules.

Add it when you initialize a project, ideally before the first commit, to keep node_modules, build output, and secrets like .env out of version control. Note that .gitignore only affects untracked files — if a file was already committed, run git rm --cached <file> to stop tracking it without deleting it locally.

Ten bundled templates, concatenated not merged

Node, Python, Go, Java, Rust, React, Vue, Docker, Terraform and iOS are each a fixed inline string, and selecting several concatenates them under `# ── name ──` headers in template order. There is no deduplication step, so overlapping rules appear twice: the Node template's `.next/` and the React template's `.next/` are both emitted, as is `.env` from the Node and Docker templates. Duplicates are harmless to Git, but they make the file look broken when it is not.

Because each template is a snapshot rather than a live view, the opinions inside it are the ones true when the string was written, and some are contestable. The Rust template ignores `Cargo.lock`, right for a library and wrong for a binary, where the lockfile is what makes a build reproducible. The Node template's bare `logs` pattern is unanchored, so it matches any file or directory named `logs` at any depth, not only a log directory you created.

The four syntax rules these files depend on

A trailing slash restricts a pattern to directories, which is why `node_modules/` will not hide a file called `node_modules`. A slash anywhere except the end anchors the pattern to the directory containing the `.gitignore`, so `/dist/` matches only the top-level `dist` while `dist/` matches at any depth — the anchored form is the stronger of the two and is what you want for build output. Within a path segment `*` matches any run of characters but never crosses a `/`, while `**` crosses directory boundaries.

A leading `!` negates a pattern, and the last matching pattern wins, so order is what decides whether an exception takes effect. The rule with no escape hatch: Git does not descend into an excluded directory, so a file inside one cannot be re-included by a later `!` pattern. If you need to keep one file from an ignored directory, the directory itself must not be excluded.

Ignoring is not the same as untracking

A `.gitignore` only affects paths Git is not already tracking. Once a file is committed, adding a matching rule changes nothing: it keeps showing up in status and keeps being pushed. Removing it from the index while leaving the working copy alone is the fix. git rm --cached .env git commit -m 'stop tracking .env'

The word on that line is `cached` — without it Git deletes the file from disk too. History is a separate matter: the secret is still in every earlier commit, and rotating the credential is the only real remedy, since rewriting history does not un-clone anything anyone already fetched.

Three scopes exist. The committed `.gitignore` is shared with the team. `.git/info/exclude` applies to one clone only and is never committed, which makes it right for machine-specific noise. `core.excludesFile` is a per-user global list applied to every repository you own. When a pattern misbehaves, `git check-ignore -v <path>` names the exact rule responsible. The trap in these templates specifically: `.env` as an exact name does not match `app.env`, so a stray suffixed environment file is not covered and will be committed.

Next steps

Frequently Asked Questions

How do I generate a .gitignore file?
Select your language, framework, and IDE from the dropdown menus. The tool generates a comprehensive .gitignore tailored to your stack, covering compiled binaries, dependency folders, environment files, and editor-specific files.
Can I customize the generated .gitignore?
Yes. You can edit the generated file before copying it. Add or remove patterns as needed. The tool creates a solid starting point that covers the most common cases for your selected stack.
Is my data sent to a server?
No. Every tool on jsonversal runs entirely in your browser using the Web Crypto API, File API, and Clipboard API. Nothing is ever uploaded — not even the JSON you paste in.
Do I need an account or API key?
No signup, no email, no API key. All tools are free to use with no signup required.
Can I use these tools offline?
Yes. Once the page loads, all tools work offline. There are no external API calls or CDN dependencies at runtime.
🔒
Your data never leaves your device

All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.

esc
↑↓ navigate ↵ open esc close