Glob Pattern Tester
Test file paths against a glob pattern (*, **, ?, [...], {a,b}) in your browser.
- src/index.tsmatch
- src/lib/util.tsmatch
- src/index.jsno match
- README.mdno match
- test/spec.tsno match
How to use
- Enter a glob pattern such as src/**/*.ts.
- Paste one file path per line into the paths box.
- Each path is marked as a match or no match, with a count summary.
About this tool
ShowHide
Type a glob pattern and a list of file paths and see at a glance which ones match, with a running count of hits. The pattern is compiled to a regular expression the way most build tools do it: braces are expanded first, including nested ones, then each segment is translated. A single star and a question mark stay inside one path segment and never cross a slash, while a double star between slashes matches zero or more directories — which is why src/**/*.ts also matches src/index.ts, a case people often expect to fail. A trailing double star matches everything below the prefix. Note that a leading dot is not special here, so a star does match .env, unlike in a shell. Everything runs locally in your browser — nothing is uploaded.
Frequently asked questions
What is the difference between * and **?
A single * matches any characters within one path segment (it stops at /). A double ** matches across segments, including slashes, so src/**/*.ts also matches src/a.ts.
Are brace patterns supported?
Yes. {a,b,c} expands to alternatives, so img.{png,jpg} matches img.png and img.jpg. Nested and multiple braces are supported.
Is matching case-sensitive?
Yes. Patterns are matched case-sensitively against the full path, anchored at both ends.
Is my data sent anywhere?
No. Matching happens entirely in your browser; nothing is uploaded.
Why does src/**/*.ts match src/index.ts with no directory in between?
Because ** between slashes means zero or more directories, not one or more. That is the standard behaviour in build tools and the reason the pattern is written that way — src/*/*.ts is what you would use if you truly required at least one subdirectory.
Does * skip dotfiles the way a shell does?
No. A leading dot is not special here, so * matches .env and .gitignore. Bash hides them unless you set dotglob, and some libraries follow that convention while others do not — worth checking against whichever tool will actually run your pattern.
Related tools
EditorConfig Tester
Paste an .editorconfig and some file paths: see the property set each file resolves to, and which section on which line decided every value.
Developer
.gitignore Tester
Paste a .gitignore and a list of paths to see which are ignored and exactly which line decided — the answer git check-ignore -v gives.
Developer
Regex Tester
Test JavaScript regular expressions live with highlighted matches and replace preview.
Developer
CSS Selector Tester
Test a CSS selector against your HTML and see exactly which elements it matches, in your browser.
Developer
.gitattributes Tester
Paste a .gitattributes and a list of paths to see every attribute git ends up setting on each path, and which line — or which macro — set it.
Developer
XPath Tester
Run an XPath expression against XML or HTML in your browser and see every node it matches, with namespace prefixes and parse errors reported.
Developer