deftools.io Developer Tools

Glob Pattern Tester

Test glob patterns against a list of file paths. Supports *, **, ?, brace expansion, and negation (!).

Examples:
Matches

About this tool

A glob is a shorthand pattern language used to match file paths. It powers .gitignore, tsconfig.json include/exclude, ESLint and Prettier ignore, webpack/vite entry globs, and shell wildcards. This tool lets you write a pattern, paste a list of file paths, and instantly see which ones match — so you can verify a pattern before committing it to a config file.

Supported syntax: * matches anything except a slash, ** matches across directories (including zero), ? matches a single character, [abc] is a character class, brace expansion like {js,ts} produces alternation, and a leading ! negates the pattern (useful for ignore-style files).

Examples:

  • The common case src/**/*.{ts,js} matches src/index.ts and src/utils/helpers.js but not README.md.
  • !**/node_modules/** (with negation on) matches everything except paths under node_modules/.

FAQ

What's the difference between * and **?

A single * matches any sequence of characters except a path separator (/), so src/*.ts matches src/index.ts but not src/utils/helpers.ts. A double-star (**) matches across directory boundaries, so src/**/*.ts matches files at any depth under src/.

Does this support negation like .gitignore?

Yes. Enable "Support ! negation" and prefix a pattern with ! to invert it. This mirrors the semantics of .gitignore and tools like globby. You can combine multiple lines of patterns (one per line) to build an ignore-style ruleset.

Why does * not match dotfiles by default?

Following the convention of most glob libraries (minimatch, micromatch), a leading * does not match files whose name starts with a dot. Toggle "matches dotfiles" on if you want .env or .gitignore to be included.

Can I paste a real file tree?

Yes — paste one path per line. The output of git ls-files, find ., or a directory listing all work. Lines starting with # are treated as comments and ignored.

More developer tools

Copied!