Glob Pattern Tester

Check which of your file paths match glob patterns such as **/*.test.ts or !dist/**. Shows which pattern decided each path.

Processed on your device. Files are not uploaded

How to test a glob pattern

  1. Enter your patterns

    One per line. Start with ! to exclude.

  2. Enter some file paths

    One per line.

  3. Read the results

    Each path shows whether it matches and which pattern decided.

Worked example

This is what Glob Pattern Tester gives for its own sample values. Open the tool above and change anything to try your own.

Patterns, one per line (start with ! to exclude)

src/**/*.ts
!**/*.test.ts
*.md

File paths to test, one per line

src/index.ts
src/lib/util.ts
src/lib/util.test.ts
README.md
docs/guide.md
package.json
PathResultDecided by
src/index.tsMatchsrc/**/*.ts
src/lib/util.tsMatchsrc/**/*.ts
src/lib/util.test.tsNo match!**/*.test.ts
README.mdMatch*.md
docs/guide.mdMatch*.md

About Glob Pattern Tester

Check which paths match patterns such as src/**/*.ts, with exclusions like !**/*.test.ts. The pattern that decided each path is shown, so you can see why a file is in or out.

FAQs

What does ** mean?

It matches across folders, so src/**/*.ts matches files at any depth under src.

Do exclusions work like .gitignore?

The last matching pattern decides, so put ! patterns after the ones they refine.

Can I make a .gitignore?

Use .gitignore Generator.

Related tools