Glob Pattern Tester

Test glob patterns against a list of paths in real time.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

This tool tests a glob pattern against a list of file paths and shows exactly which ones match, live as you type. It’s useful for sanity-checking .gitignore rules, build globs, CI path filters, and tooling config before you commit them — so you catch a too-greedy or too-narrow pattern early.

How it works

The tester compiles your glob into a regular expression and anchors it to the whole path, so a path matches only when the entire string fits the pattern. Brace alternation is expanded first, then the wildcards are translated:

  • * → any run of characters except a slash (stays inside one segment)
  • ** → the globstar, matching across directory boundaries
  • ? → exactly one character
  • [a-z], [!abc] → character classes, including negation
  • {ts,tsx} → alternation, expanded to ts or tsx

Each path you paste is tested against the compiled expression and ticked if it matches, with a running count of matches.

Example

Pattern: src/**/*.{ts,tsx}

PathMatches?
src/index.ts
src/components/Button.tsx
src/utils/deep/helper.ts
src/styles.css❌ (wrong extension)
lib/index.ts❌ (not under src)

The globstar ** reaches files at any depth under src, while the {ts,tsx} alternation accepts both extensions. Everything is compiled and matched in your browser — nothing is uploaded.

Ad placeholder (rectangle)