Skip to main content

Glob Pattern Tester — Match Paths, See the Regex

Test which paths a glob matches — supports * ** ? [a-z] {js,ts} and ! — see the equivalent regex — browser-only

  • Runs locally
  • Category Developer & DevOps
  • Best for Checking file type, size, metadata, and obvious mismatch signals before sharing.
Equivalent regex
/^src/(?:.*/)?[^/]*\.ts$/
Summary
3 Matched of 6
  • src/index.ts✓ match
  • src/utils/date.ts✓ match
  • src/types.d.ts✓ match
  • README.md· no match
  • dist/app.js· no match
  • test/index.test.ts· no match

What this tool does

Free glob pattern tester for .gitignore rules, build configs and file matching. Paste a glob like src/**/*.ts on one side, a list of paths on the other, and every line is flagged matched or not, instantly. The tool compiles your glob into the exact equivalent regular expression and shows it, so you learn why a pattern hits or misses instead of guessing. It handles the full glob vocabulary: a single star matches one path segment, a double star walks across directories at any depth, a question mark is one character, square brackets are character classes with ranges, curly braces are alternation groups, and a leading exclamation mark negates the whole pattern in gitignore style. Everything runs in your browser with no upload, copy the matched paths in one click, and the shareable link reopens your exact pattern and path list for a teammate. 100% client-side.

Tool details

Input
Files + Text
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Developer & DevOps · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Glob Pattern Tester fits into your work

Use it before upload, handoff, archive, support review, or any moment where a file needs one local check before it leaves your machine.

File jobs

  • Checking file type, size, metadata, and obvious mismatch signals before sharing.
  • Preparing mixed folders for upload, archive, intake, or review.
  • Keeping sensitive files in the browser instead of sending them to an account-based service.

File checks

  • Do not treat the extension alone as proof of the real file type.
  • Review metadata before a file goes to customers, vendors, or a public page.
  • Keep the original file until the copied, converted, or exported result is verified.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Regex Tester Test JavaScript regex live — match highlighting, group capture, replace preview, flag toggles — browser-only Open
  2. 2 .gitignore Generator Pick your stack — Node, Python, Go, Docker, macOS, VS Code — and get a deduped, sectioned .gitignore. Browser-only. Open
  3. 3 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open

Real-world use cases

  • Verify a .gitignore rule before committing it

    You add dist/** to .gitignore but a build artifact keeps showing up in git status. Paste dist/** as the pattern and the real paths that leak (dist/app.js, dist/chunks/vendor.js, build/dist/x.js) and the tester shows instantly which ones the rule actually catches. You discover build/dist/x.js is not matched because the rule is anchored at the root, fix it to **/dist/** and confirm before the commit, not after.

  • Pick the right include glob for a build tool

    Vite or ESLint wants a glob for which files to process. You think src/*.ts covers everything, paste a few nested paths, and see that src/utils/date.ts is skipped because a single star stays in one folder. Switch to src/**/*.ts, watch every nested file flip to matched, and copy the working pattern straight into your config.

  • Teach or learn how globs map to regex

    A teammate does not see why **/*.ts matches a top-level file. Type the glob and read the equivalent regex the tester prints alongside the results. Seeing (?:.*/)? for the double star makes it obvious the directory prefix is optional, which is why index.ts matches with zero folders. Share the link so the explanation reopens with your exact example.

  • Filter a deploy or CI path list

    A CI job should only run when files under packages match. Paste the path filter glob and the changed-file list from a pull request, then read which files trip the job. You catch that a docs-only change still matches because the glob was too loose, tighten it, and stop wasting CI minutes on builds that did not need to run.

Common pitfalls

  • Expecting a single star to cross directories. A single star stays inside one path segment, so *.ts only matches files in the current folder and src/*.ts skips src/sub/x.ts. When files can nest, use a double star like src/**/*.ts instead.

  • Forgetting that ** needs its own segment. Writing src/**.ts does not walk directories the way you expect; the directory-crossing form is src/**/*.ts where the double star and the file pattern are separated by a slash. The tester shows the difference immediately.

  • Treating glob like regex. A dot in a glob is a literal dot, a plus is a literal plus, and there is no anchoring with ^ or $. So *.txt means a literal .txt extension, not any char then txt. The equivalent-regex panel makes the escaping explicit so you do not over-think it.

Privacy

The whole tester is plain JavaScript that runs in your browser tab. Your glob pattern, your path list and the matching results never leave the page, and nothing is logged. The one caveat: the shareable link encodes your pattern and paths in the URL, so a link pasted into chat will record those paths in the recipient server access log. If your paths are sensitive, use the copy button and paste the text rather than the URL.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-05-30