Glob Tester
Test glob patterns against a list of file names with per-line match marks and the regex shown.
Invalid pattern — braces or brackets are unbalanced.
How to use it
- Type a glob pattern in the first field — for example
src/**/*.{ts,tsx}. - Paste file names into the second field, one per line.
- Each line is marked as matched or not matched in real time, with a running count.
- The status line shows the compiled regex source, so you can see exactly how your pattern translated.
- Load the sample to start from a working example.
Common use cases
- Build tool config — verify the
include/excludeglobs in tsconfig, ESLint or bundler settings before committing them. - Ignore rules — check which files a
.gitignore-style pattern would catch. - CI scripts — confirm a copy or lint step will pick up exactly the files you expect.
- Learning glob syntax — compare
*versus**and see the difference immediately.
Why it stays private
Pattern matching runs through a locally compiled regular expression; nothing is uploaded. You can safely test patterns against internal file trees that you would not paste into an online service.
FAQ
Q: Which syntax subset is supported?
A: * (within a path segment), ** (across segments), ? (single non-slash character), [abc] and [!abc] classes, and {a,b} alternatives, including nesting. Recursive brace expansion like {a,b/**} degrades to plain alternation.
Q: Why does ** sometimes swallow the following slash?
A: A ** followed by / is treated as "any number of directories", matching the convention in most build tools. That is why src/**/*.ts matches both src/a.ts and src/x/y.ts.
Q: Are paths matched from the start?
A: Yes. The whole file name must match the pattern, just like gitignore-style tooling. Anchor your pattern with **/ at the start if you want to match at any depth.
Your data stays on this device
Glob Tester runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.