---
title: "Glob Pattern Tester"
description: "Test glob patterns against file lists in real-time. Supports wildcards (*, **), character classes ([abc]), brace expansion ({a,b}), and negation patterns."
url: https://findutils.com/developers/glob-pattern-tester/
category: developers
---

# Glob Pattern Tester

Test glob patterns against file lists in real-time. Supports wildcards (*, **), character classes ([abc]), brace expansion ({a,b}), and negation patterns.

**Use this tool:** [Glob Pattern Tester](https://findutils.com/developers/glob-pattern-tester/)

## Programmatic access

- REST id `glob-pattern-tester`: POST https://api.findutils.com/api/tools/glob-pattern-tester/execute (reference: https://findutils.com/api/glob-pattern-tester/)
- MCP tool `glob_pattern_tester` on https://mcp.findutils.com (reference: https://findutils.com/mcp/glob-pattern-tester/)

## Why Use Our Glob Pattern Tester?

Glob patterns are used everywhere — in.gitignore files, CI/CD configurations, build tools, and shell commands. Getting them wrong can include unwanted files or miss critical ones. Our tester lets you paste your file list and test patterns instantly in the browser. No installation needed, and it supports all standard glob syntax including **, brace expansion, and negation.

## Tips & Best Practices

- Always test ** patterns carefully — src/** matches everything inside src/ recursively, including deeply nested files that you might not expect.
- Use brace expansion to combine related patterns: *.{js,jsx,ts,tsx} is cleaner and more maintainable than four separate patterns.
- Remember that * does not match across directory separators. Use **/filename to find a file at any depth in the directory tree.
- When building.gitignore rules, test both the inclusion and exclusion patterns together. A negation pattern (!important.log) only works if a previous pattern matched that file.
- Character classes [0-9] and [a-z] work in glob patterns just like in regex. Use them to match numbered files like log-[0-9]*.txt or versioned assets.

## Frequently Asked Questions

### What is a glob pattern?

A glob pattern is a wildcard syntax used to match file paths. Common in shell commands (ls *.txt).gitignore files, and build tools. Key operators: * matches any characters except /, ** matches across directories,? matches a single character.

### What is the difference between * and **?

* matches any characters within a single directory level (e.g., src/*.js matches src/index.js but not src/lib/utils.js). ** matches across multiple directory levels (e.g., src/**/*.js matches both).

### How do brace expansions work?

Braces create comma-separated alternatives. For example, *.{js,ts} matches both.js and.ts files. {src,lib}/**/*.tsx matches.tsx files in either src/ or lib/ directories.

### Can I use this for.gitignore patterns?

Yes, the syntax is very similar. You can test your.gitignore patterns here to verify they match the correct files before adding them to your repository.

### Does this tool require a signup?

No. It is available with no signup required. All pattern matching happens in your browser — nothing is uploaded to any server.

### What is the difference between glob patterns and regular expressions?

Glob patterns are simpler and designed specifically for matching file paths. They use * for wildcards and ** for recursive directory matching. Regular expressions are more powerful but complex, using syntax like.* and character groups. For file path matching, globs are easier to read and write. For general text matching, use a [Regex Tester](https://findutils.com/developers/regex-tester/) instead.

### Does this tool support minimatch or micromatch syntax?

Yes. This glob tester uses the same matching logic as popular JavaScript libraries like micromatch and minimatch, which power tools such as webpack, Babel, Jest, and ESLint. Patterns you test here will behave identically in those tools.

### How do I match all files in nested subdirectories?

Use the ** globstar pattern. For example, src/** matches every file and folder inside src/ at any depth. To match only specific file types recursively, combine it with an extension filter like src/**/*.ts.

### Can I use negation patterns to exclude files?

Yes. Prefix a pattern with! to negate it. For example,!*.test.js excludes all test files. Negation patterns are commonly used in.gitignore and build configurations to exclude specific files from a broader match.

### How do I test.dockerignore or.eslintignore patterns?

Paste the file list from your project and enter your ignore patterns one at a time. The syntax for.dockerignore.eslintignore.prettierignore, and.gitignore is nearly identical and all use standard glob matching. This tool validates them all.

## Related Tools

- [Regex Tester](https://findutils.com/developers/regex-tester/)
- [Diff Checker](https://findutils.com/text/diff-checker/)
- [JSON Path Finder](https://findutils.com/developers/json-path-finder/)
- [YAML Validator](https://findutils.com/developers/yaml-validator/)
- [Robots.txt Generator](https://findutils.com/seo/robots-txt-generator/)
- [HTML Formatter](https://findutils.com/developers/html-formatter/)
- [CSS Minifier](https://findutils.com/developers/css-minifier/)
- [JQ Playground](https://findutils.com/developers/jq-playground/)
