Tools / Glob Pattern Tester

Glob Pattern Tester.

Test glob patterns like src/**/*.{ts,tsx} and !**/*.test.ts against a list of file paths.

Runs in your browser

One pattern per line. Lines starting with ! exclude; lines starting with # are comments.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Results
Compiled patterns
Summary

About Glob Pattern Tester

Glob Pattern Tester shows which files a glob pattern selects before you put it into a build config, a test runner, a linter, a CI cache key or a deployment filter. Write one or more patterns, paste a list of paths, and every path is marked as matched or not, with the pattern that included or excluded it. The syntax follows the conventions of minimatch, picomatch and fast-glob used across the Node ecosystem: * matches any characters inside one path segment, ** on its own matches any number of directories (including none), ? matches one character, [abc], [a-z], [!abc] and POSIX classes such as [[:digit:]] match a set, {js,ts} and {1..5} expand into alternatives, and a backslash escapes a special character. Lines starting with ! are exclusions: a path is selected when it matches at least one include pattern and no exclusion, so src/**/*.ts with !**/*.test.ts picks every TypeScript file except tests. Wildcards skip dotfiles such as .env or .github unless you enable dotfile matching or write the dot yourself, which is the usual reason a pattern seems to miss files. Another classic mistake is *.js instead of **/*.js: a single star never crosses a slash, so it only matches files in the top folder. A leading ./ in paths or patterns is ignored. The compiled regular expression for each pattern is shown so you can see exactly what it accepts. Extglobs such as @(a|b) are not supported. Everything runs in your browser.

How to Use

  1. Enter glob patterns, one per line, with ! for exclusions.
  2. Paste the file paths to test, one per line.
  3. Read which paths match and which pattern decided it.

Frequently Asked Questions

What is the difference between * and **?

A single * matches within one directory level and never crosses a slash. ** as a whole segment matches any number of directories, so **/*.js finds .js files at any depth.

Why does my pattern not match .env or .github?

Wildcards do not match names that start with a dot unless you turn on dotfile matching or write the dot explicitly, for example .* or .github/**.

How do exclusions work?

A path is selected if it matches any include pattern and no ! pattern. If there are only exclusions, every path that no exclusion matches is selected.

Are my paths uploaded?

No. Patterns are compiled and tested in your browser, and the page makes no network requests while you use it.

Related Tools