Glob Filter

Paste paths from git ls-files or find, add glob or gitignore-style include/exclude patterns, and preview exactly which paths are kept or dropped. Runs locally in your browser.

Try:
Filtered paths

About this tool

Glob Filter lets you paste a list of paths and preview which ones match include and exclude patterns. It is useful for designing .gitignore, Docker ignore, CI include/exclude, packaging, and code-search file filters before applying them to a real repository.

Use gitignore-style syntax when you want familiar .gitignore behavior: patterns without / match at any depth, / anchors to the root, directory patterns cover everything below them, blank lines and # comments are ignored, and ! can re-include a later exception. Use whole-path glob syntax when each pattern should match the entire path and **/ is required for any-depth matches.

Worked example

Paths:

src/main.rs
src/lib.rs
tests/app.test.ts
target/debug/app
README.md

Include patterns:

*.rs

Exclude patterns:

target/

With Pattern syntax = gitignore-style and Output = Matched, the result is:

src/main.rs
src/lib.rs

Syntax notes

Limits & edge cases

FAQ

What is the difference between glob and gitignore-style syntax?

Whole-path glob treats every pattern as matching the complete path, so *.rs matches main.rs but not src/main.rs; use **/*.rs for any depth. Gitignore-style syntax follows .gitignore conventions, so *.rs matches Rust files anywhere in the path list.

How do include and exclude patterns combine?

A path is kept if it matches the include list (or the include list is empty) and it does not match the exclude list. Exclude patterns therefore remove paths after the include step. Within each pattern list, later lines override earlier ones when you use ! negation.

Can I test a real folder directly?

No. The tool is text-in/text-out and browser-local: paste paths from commands such as git ls-files, find, or a build log. That keeps the page portable and avoids filesystem permissions or uploads.

Does it support comments and negation like .gitignore?

Yes in gitignore-style mode. Blank lines and # comments are ignored, and a leading ! re-includes paths in the same include or exclude list. Escape a literal leading # or ! with a backslash.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool glob-filter "src/main.rs
src/lib.rs
tests/app.test.ts
target/debug/app
README.md"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/glob-filter/?paths=src%2Fmain.rs%0Asrc%2Flib.rs%0Atests%2Fapp.test.ts%0Atarget%2Fdebug%2Fapp%0AREADME.md&include=%2A.rs%0A%2A.md&exclude=target%2F%0A%21target%2Fkeep.txt&syntax=gitignore&case_sensitive=true&output=matched

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.