Glob Pattern Tester
Free online glob pattern tester. 100% client-side.
Loading tool...
What is Glob Pattern Tester?
The Glob Pattern Tester is a free developer tool for testing glob and minimatch patterns against real file paths. Paste your patterns, paste your paths, and instantly see which paths match β with excluded paths struck through so you can debug ignore rules before committing them to .gitignore, .dockerignore, CI configs, or bundler entries. The matching engine implements the core glob syntax (*, **, ?, [a-z], {a,b}, ! negation) and runs entirely in your browser.
Key Benefits
- Debug .gitignore and .dockerignore rules before they silently drop files
- Verify bundler and vite/webpack include patterns match the files you expect
- Learn glob syntax interactively with curated examples and instant feedback
- Keep internal repository paths private β zero network calls
- Copy the matched path list straight into your config files
Common Use Cases
- β’Write .gitignore entries for generated directories without guesswork
- β’Craft .dockerignore rules that exclude build output but keep source files
- β’Test CI/CD path filters (which files trigger a build) against a real tree
- β’Build file-watcher include lists for webpack, vite, or esbuild configs
- β’Teach teammates glob syntax with shareable pattern examples
How to Use the Glob Pattern Tester
- Enter your patterns: Type one glob pattern per line in the patterns box. Prefix a line with ! to exclude matches, and use # to add comment lines. Supports *, **, ?, [a-z], and {a,b}.
- Paste your file paths: Paste the file paths you want to test, one per line. Copy them from git ls-files, find, or your file tree β or click an example chip to load a ready-made pattern and path set.
- Read the results: Matching paths are marked with a green check. Paths struck through in red matched an exclude (!) rule. A counter shows how many of your paths match.
- Fix and iterate: Adjust the pattern and watch matches update instantly. When the result looks right, use Copy matches to grab the matched path list for your .gitignore, CI config, or bundler setup.
Key Features
- Full glob syntax: *, **, ?, [a-z], [!abc], and {a,b} brace expansion
- Include/exclude rule sets with ! negation, gitignore-style
- Instant match highlighting as you type patterns or paths
- Unclosed character classes and malformed patterns flagged with clear errors
- Curated example chips: src JS files, negated build output, image extensions
- 100% client-side matching engine β no network calls, safe for private paths