Use Glob Pattern Tester

Enter your data below to use the Glob Pattern Tester

📌 Try these examples:
RESULT

Last updated

Quick Reference: Glob Syntax

Examples

Example 1: Basic Wildcard Patterns

Pattern: *.js
Matches:
  ✅ index.js
  ✅ app.js
  ✅ utils.js
Does NOT match:
  ❌ src/index.js      (subdirectory — use **/*.js for recursive)
  ❌ index.jsx
  ❌ index.ts
Pattern: *.{js,ts}
Matches:
  ✅ index.js
  ✅ app.ts
  ✅ utils.js
Does NOT match:
  ❌ src/index.js
  ❌ index.jsx
  ❌ index.tsx

Example 2: The Critical Difference Between * and **

Pattern: src/*.js
Matches:
  ✅ src/index.js
  ✅ src/app.js
Does NOT match:
  ❌ src/utils/helpers.js    (one level deep — need **)
  ❌ src/components/Button.js

Pattern: src/**/*.js
Matches:
  ✅ src/index.js
  ✅ src/utils/helpers.js
  ✅ src/components/Button.js
  ✅ src/components/forms/Input.js
  ✅ src/deeply/nested/path/file.js

Example 3: .gitignore Patterns

# Ignore all .log files anywhere in the repo
*.log
  Matches: error.log, logs/app.log, deep/path/debug.log

# Ignore node_modules directory
node_modules/
  Matches: node_modules/ (directory only, not a file named node_modules)

# Ignore build output at root only
/dist
  Matches: dist/ (root only)
  Does NOT match: packages/app/dist/

# Ignore all .env files except .env.example
.env*
!.env.example
  Matches: .env, .env.local, .env.production
  Does NOT match: .env.example (negation)

# Ignore all files in any __pycache__ directory
**/__pycache__/
  Matches: __pycache__/, src/__pycache__/, deep/path/__pycache__/

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.

Yes! Glob Pattern Tester is completely free to use with no registration required. All processing is done client-side in your browser.

Absolutely! All processing happens locally in your browser. Your data never leaves your device, ensuring complete privacy and security.