Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is Glob tester?
Glob tester is a browser-based tool for testing and visualising glob pattern matching. You type a glob pattern into an input field, and every file in the displayed directory tree that matches is highlighted in blue. It exists to answer a narrow but frequently annoying question: "what does this pattern actually match?"
What it is good for
Glob patterns are the shorthand used to select files by name — the *.jpg in cp *.jpg ./thumbnails, or the rules inside a .gitignore file. They are compact, easy to get subtly wrong, and usually evaluated silently by a shell, build tool or version-control system. Globster replaces that guesswork with a visible result: you see the directory tree, you see which entries light up, and you adjust the pattern until the highlighting matches your intent.
That makes it useful in three situations:
- Debugging a pattern that misbehaves. When an ignore rule excludes too much or a build glob misses nested files, you can reproduce the structure and watch which branches match.
- Learning the syntax. The site ships a set of glob examples, so someone meeting
**, brace expansion or extended glob syntax for the first time can experiment rather than read a manual. - Checking edge cases before committing. Patterns involving directory-only matches or nested brace sets are exactly the ones that surprise people, and they are cheap to verify here.
How matching works
Patterns are evaluated with the minimatch JavaScript library (version 3.0.4), so the behaviour you see reflects minimatch's dialect rather than, say, Bash's or Python's. The supported features include the basic wildcards ? and *, the path separator /, globstar **, brace expansion such as {a,b} and {a..c}, and extended glob syntax like ?(a|b) and +(a|b).
One detail worth internalising: ** only behaves as "zero or more directories" when it is the sole content of a path segment. A pattern like /myapp/**.js will not recurse the way people often expect. Brace expansion, by contrast, is simply a union — **/*.{b,c} is evaluated as **/*.b plus **/*.c.
A practical next step
If a pattern is not doing what you want, reduce it to one segment and rebuild. Start with *, confirm which files appear, then add /, ** or a brace set one piece at a time and watch the highlighting change. That incremental habit transfers directly to .gitignore rules and build configuration, where the same syntax appears in slightly different dialects — minimatch, micromatch and extglob in JavaScript, the glob module in Python, and shell globbing on Linux. Since dialect differences are the usual source of confusion, treat the tool as a way to test minimatch-compatible patterns specifically, not as a universal glob oracle.
Related references: Git for .gitignore pattern rules and Python documentation for the glob module's differing behaviour.
How can I test a glob pattern with this tool?
Open Glob tester in your browser, type your pattern into the input field, and watch the directory tree: every file that matches is highlighted in blue. That live highlighting is the whole point of the tool — you see the match set rather than guessing at it. The site evaluates patterns with the minimatch JavaScript library (version 3.0.4), so what you see reflects minimatch's rules, not your shell's or your language's.
A concrete workflow
Say you want to copy only JPEGs from a nested project into a thumbnails folder and you are unsure whether *.jpg reaches subdirectories. Enter *.jpg, note that only top-level files light up, then try **/*.jpg and compare. You can also edit the file list yourself using the "edit files" control, so you can reproduce your actual folder layout instead of relying on the sample tree.
Syntax worth testing
The tool's examples cover the constructs minimatch supports:
?matches a single character;*matches any string./is the path separator.**is globstar: it matches all files plus zero or more directories and subdirectories. Followed by/it matches only directories. It only behaves this way when it is the sole element of a path part, so a pattern like/myapp/**.jswill not work as globstar.{a,b}is brace expansion:**/*.{b,c}becomes**/*.band**/*.c, and the result is the union of both. Ranges such as**/{a..c}expand to**/a,**/b,**/c.- Extended globbing (extglob) forms:
?(a|b),*(a|b),+(a|b),@(a|b),!(a|b).
When to reach for it
Use it when a pattern silently matches too much or too little — a .gitignore rule that excludes a file you meant to keep, a build script that misses nested assets, or a glob you are about to paste into a tool. The trade-off is that this is a minimatch sandbox: your shell, Python's glob module, and Linux globbing each differ in edge cases, so a pattern that works here may need adjusting elsewhere. Test the specific implementation you will ship with once the shape of the pattern is right.
A useful next step: build the pattern incrementally, starting from ** and adding one constraint at a time, so you can see exactly which part changes the highlighted set.
What glob syntax and wildcards does this tool support?
Globster supports the minimatch (JavaScript) dialect of globbing, version 3.0.4, which is broader than the basic ? and * wildcards found in a plain shell.
Supported syntax
| Pattern | Meaning |
|---|---|
? |
Matches a single character |
* |
Matches any string |
/ |
Path separator |
** |
Globstar: matches all files plus zero or more directories and subdirectories. Must stand alone inside a path segment — /myapp/**.js does not behave as globstar |
{a,b} |
Brace expansion: **/*.{b,c} becomes **/*.b and **/*.c, with results combined |
{a..c} |
Brace ranges: **/{a..c} expands to **/a, **/b, **/c |
?(a|b) |
Extglob: zero or one occurrence |
*(a|b) |
Extglob: zero or more occurrences |
+(a|b) |
Extglob: one or more occurrences |
@(a|b) |
Extglob: exactly one occurrence |
!(a|b) |
Extglob: anything except the listed patterns |
How to check a pattern
Type your pattern into the input field and Globster highlights matching files in blue inside the tree view. If you are debugging a .gitignore rule or a build script that keeps sweeping in the wrong files, this visual feedback is faster than running the command repeatedly and inspecting output. Compare your pattern against the examples section when a construct such as globstar or extglob does not match what you expected.
One caveat
Extglob and brace expansion are not universal. A pattern that works here may fail in a different engine — for example, Python's glob module or a POSIX shell — so verify against the tool that will actually run your pattern. If you need to compare dialects, GitHub hosts the minimatch and micromatch source and documentation, which describe their syntax directly.
How does this tool help debug a glob pattern that isn't matching?
Globster highlights every file that your pattern actually matches inside a tree view, so you can see the gap between what you intended and what the pattern selects. When a glob "doesn't work," the usual cause is one of a few things: a * that doesn't cross directory boundaries, a ** that isn't standing alone as its own path segment, a brace group that expands into something different from what you assumed, or an extended-glob operator (?(...), *(...), +(...), @(...), !(...)) with the wrong quantifier. Seeing the matches light up in blue turns each of these from a guess into an observation.
A practical debugging loop
- Start with the pattern you're using in your real tool (a
.gitignoreline, a build script, a linter config) and paste it in. - Look at what's highlighted. If nothing is, simplify: replace the tricky segment with
**or*and confirm the file is reachable at all. - Add one feature back at a time — wildcards, then globstar, then braces, then extglob — and watch where the match set changes unexpectedly.
- Compare the result against the syntax notes and examples on the page, which document the operators this implementation supports.
The site evaluates patterns with the minimatch JavaScript library, so its verdicts reflect minimatch's rules rather than your shell's. That's the main trade-off to keep in mind: glob syntax varies by implementation, and a pattern that behaves one way here may behave differently in Bash, Python's glob module, or another matcher. Use Globster to isolate the logic of the pattern, then confirm the final version in the environment where it will actually run.
Worked example
Suppose you want every JavaScript file under a project, including nested folders. A pattern like /myapp/**.js looks plausible but doesn't behave as a recursive match, because ** only acts as globstar when it is the entire path segment. Testing it shows limited matches; restructuring to **/*.js highlights files at every depth. Similarly, **/*.{b,c} is not one clever pattern but a shorthand that expands into **/*.b and **/*.c, with the results combined — useful to know when a match set seems larger than expected.
For a concrete scenario: you maintain a repository and your .gitignore line isn't excluding a generated folder. Paste the pattern, see which paths escape it, and adjust the segment that's too narrow or too broad.
If you want to compare behaviour across engines after testing here, the official documentation for Git covers gitignore pattern rules, and Python documents its glob module for the Python equivalent.
Where is globbing used in real workflows like gitignore?
Globbing is a shorthand for matching filenames by pattern rather than listing them one by one. You meet it whenever a tool needs to say "these files, not those." Globster.xyz is a browser tool for testing a pattern against a sample file tree and seeing which paths light up, which makes it useful for the moment a pattern silently fails.
Where globbing shows up in practice
- Shell commands.
cp *.jpg ./thumbnailscopies every JPEG in the current directory. The*.jpgpart is the glob; the shell expands it before the command runs. - Git ignore rules. A
.gitignoreline such as*.logorbuild/excludes matching files and folders from version control. This is the case most developers hit first, and it is glob-like rather than full regular expressions. - Build and bundler configs. Tools that copy, watch or exclude assets usually accept glob patterns for their input and ignore lists.
- Linters, formatters and test runners. Patterns decide which files get checked, which are skipped, and which directories are walked.
- Language libraries. JavaScript has minimatch and micromatch; Python ships a
globmodule; Linux shells have their own glob handling. Syntax differs between implementations, which is the main source of confusion.
Why patterns fail, and how to debug them
The common failure is a pattern that looks right but matches nothing, or matches far more than intended. Two culprits dominate:
- Globstar placement.
**matches files plus zero or more directories and subdirectories, but only when it stands alone in a path segment. A pattern like/myapp/**.jsdoes not behave the way people expect. - Brace expansion.
**/*.{b,c}is expanded into**/*.band**/*.c, and the result is the union of both. It is not a single clever expression.
Globster.xyz evaluates patterns with the minimatch library and highlights matches in a directory tree, so you can type a pattern, see exactly which files match, and adjust. It also lets you edit the sample file list, which matters because a pattern's behaviour depends on the names present. If your real project has a directory you forgot about, a test against a generic tree will not reveal it.
A concrete workflow
Suppose .gitignore is not excluding your generated files. Copy a few representative paths into the tool's file editor, including the awkward ones — nested folders, files with dots in the name, a directory that should stay tracked. Try the pattern, then narrow or broaden it until only the intended paths are highlighted. Paste the working pattern back into .gitignore, and remember that Git's own matching rules are not identical to minimatch, so verify with git status or git check-ignore -v <path> afterward.
For general reference on shell pattern syntax, GNU Bash manual documents the shell side. For Git's specific behaviour, Git documentation is authoritative on ignore rules.
Choosing the right tool
| Situation | Better approach |
|---|---|
| Simple extension or folder exclusion | Plain glob, as in .gitignore |
| Conditional logic, capture groups, lookarounds | Regular expressions |
| Cross-tool config where syntax must be portable | Check the specific library's documented syntax before assuming |
The practical rule: use globs for path selection, and reach for regex only when the pattern needs structure beyond names and directories. When a glob misbehaves, test it against realistic filenames before trusting it in a config file.
What are glob examples I can try to learn the syntax?
Start with the wildcard basics, then add one advanced feature at a time. Globster's examples section is built around minimatch syntax, so the patterns below are the ones the site is designed to demonstrate.
Beginner patterns
*.jpg— matches files ending in.jpgin the current directory, the same pattern the site uses in itscp *.jpg ./thumbnailsexample.?— exactly one character, sofile?.txtmatchesfile1.txtbut notfile10.txt.*— any string, soreport*matchesreport,report-final.csvandreports/./— the path separator; keep it in mind because*normally stops at a directory boundary in many implementations.
Intermediate patterns
**/*.js— globstar: every.jsfile at any depth. Globster notes that**must be the only thing in its path segment, so/myapp/**.jsdoes not behave the same way.**/*.{b,c}— brace expansion into two patterns,**/*.band**/*.c, with the results combined.**/{a..c}— a brace range, expanded to**/a,**/band**/c.src/**/test?.js— combine globstar with a single-character wildcard to see how narrow the match becomes.
Extended globbing (extglob)
?(a|b)— zero or one occurrence.*(a|b)— zero or more occurrences.+(a|b)— one or more occurrences.@(a|b)— exactly one of the listed options.!(a|b)— anything except the listed options.
A practical way to use these
Paste a pattern into the input field and watch which files highlight blue in the tree. If nothing highlights, simplify: remove the brace or extglob part, confirm the plain * version matches, then add complexity back. That turns a failed pattern into a specific question about one syntax feature.
Where the same syntax shows up
Glob patterns are not only a shell feature. The .gitignore file uses them to exclude files from version control, and the same style of matching appears in build tools, linters and test runners. Globster evaluates patterns with the minimatch JavaScript library, and the site points to related implementations including micromatch and extglob for JavaScript, Python's glob module, and the Linux glob command. If you want to check how a pattern behaves in a different engine, the official documentation for those projects is the reliable reference — for example Git for .gitignore pattern rules and Python for the glob module.
A good next step: take a real .gitignore or build-tool pattern from a project you work on, paste it into the tester, and compare what it matches against what you expected.
User reviews (0)