Home › Developer Tools › Glob Pattern Tester

Glob Pattern Tester

Type one or more glob patterns, paste a list of file paths, and instantly see which files match, which are excluded and why. Handy for build configs, linters, test runners, CI path filters and .ignore files.

Last updated:

Options

Tip: paste the output of git ls-files or find . -type f. "Pick folder" only reads file names; nothing is uploaded.

    How each pattern was read

    Advertisement
    Advertisement

    How to use the Glob Pattern Tester

    1. Enter your patterns in the Glob patterns box, one per line. Start a line with ! to exclude, or # for a comment.
    2. Add file paths: paste a list (for example from git ls-files), load a .txt file, or pick a folder to list its file names.
    3. Read the results: green paths match, red ones do not, and each row says which pattern decided it.
    4. Adjust the options (dotfiles, ignore case, match base name) to mirror the tool you are configuring.
    5. Copy or download the matching paths, or check the pattern cards to see the regex each glob became.

    Glob syntax cheat sheet

    PatternMeaningMatchesDoes not match
    *Any characters within one path segment*.md → README.mddocs/guide.md
    **Zero or more folders (when it is a whole segment)docs/**/*.md → docs/a.md, docs/x/y/b.mdnotes/a.md
    ?Exactly one character (not a slash)v?.txt → v1.txtv10.txt
    [abc] / [a-z]One character from the set or range[A-C]*.png → Banner.pnglogo.png
    [!abc] / [^abc]One character not in the set[!_]*.scss → main.scss_vars.scss
    {a,b}Either alternative (brace expansion)*.{jpg,png} → a.jpg, b.pngc.gif
    {1..3}Numeric or letter rangepart{1..3}.zip → part2.zippart4.zip
    @(a|b)Exactly one of the alternatives@(app|web).config → web.configapi.config
    +(a|b) / *(a|b)One or more / zero or more repeats+([0-9]).log → 2024.logv1.log
    !(a|b)Anything except the alternatives!(index).js → main.jsindex.js
    !patternExclude paths that match (whole line)!**/*.min.js drops app.min.js
    \*Escape a special characterwhat\?.txt → what?.txtwhatx.txt

    How glob matching works

    A glob is split at every / and each piece is compared with the matching folder or file name. Wildcards such as *, ? and […] never cross a slash; only a segment that is exactly ** can span several folders, and it may also match no folder at all, so a/**/b matches a/b. Braces are expanded first, so one pattern with braces is really several patterns. Behind the scenes each glob becomes a regular expression anchored to the whole path, which you can see in the pattern cards above.

    Names that start with a dot are protected: a wildcard at the start of a segment will not match them unless the pattern itself starts with a dot or dotfile matching is turned on. This is why **/* in most tools skips .git and .env.

    Tips for writing reliable globs

    • Quote globs on the command line ("src/**/*.ts") so your shell does not expand them before the tool sees them.
    • Use forward slashes, even on Windows. Most glob libraries treat a backslash as an escape character.
    • Do not start with ./ in config files; many tools compare against paths without it. This tester strips a leading ./ from both sides.
    • Put exclusions last and keep them specific, for example !**/node_modules/** rather than !node_modules, which only matches the folder name itself.
    • Check case sensitivity: Linux file systems are case sensitive, while Windows and macOS usually are not. Use Ignore case to preview both.

    Frequently asked questions

    What is the difference between * and ** in a glob?

    A single * matches any characters inside one folder level but never crosses a slash, so src/*.js matches src/app.js but not src/lib/app.js. A ** that stands alone as a path segment (globstar) matches zero or more whole folders, so src/**/*.js matches both.

    How do negative patterns with ! work here?

    A path is a match when at least one normal pattern matches it and no ! pattern does. If you only enter ! patterns, every path starts as included and the ! patterns remove some, which is how micromatch treats a list of only negations. Each row shows the pattern that included or excluded it.

    Why does *.js not match .eslintrc.js or files in hidden folders?

    By convention *, ? and ** do not match a name that starts with a dot, so hidden files and folders such as .git or .cache are skipped. Write the dot explicitly (.*.js or **/.cache/**) or tick Match dotfiles, which works like the dot: true option of minimatch, micromatch and fast-glob.

    Are brace patterns like {js,ts} and {1..5} supported?

    Yes. Braces are expanded before matching, as in Bash: *.{js,ts} becomes *.js and *.ts, nested braces work, and ranges such as {1..5}, {01..12} (zero padded), {a..e} and {0..20..5} (with a step) are expanded too. The pattern card lists the expanded patterns.

    Does this behave exactly like minimatch, micromatch or fast-glob?

    It follows the common rules those libraries share: globstar, dotfile handling, brace expansion, character classes, extglobs and ! negation. Libraries differ in small edge cases, for example whether src/** also matches the folder src itself (it does here, as in micromatch and picomatch). Always confirm unusual patterns with the tool you are configuring.

    Is this the same as .gitignore syntax?

    Not quite. .gitignore patterns without a slash match at any depth, a trailing slash means directories only, and later lines override earlier ones. To approximate a gitignore line like *.log, tick Match base name or write **/*.log.

    Are my file paths uploaded anywhere?

    No. Matching runs entirely in your browser. When you pick a folder, only the file names are read to build the list; file contents are never opened or sent.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Regex TesterTest and debug regular expressions live.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.File Info ViewerCheck file size, type, date and MD5/SHA hashes.SQLite ViewerOpen .db and .sqlite files in your browser, browse tables and run SQL queries.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.Country Codes ListSearch ISO 3166 alpha-2, alpha-3 and numeric country codes with calling codes and TLDs.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.Graphviz Online ViewerWrite Graphviz DOT code and render graphs live; switch layout engines, export SVG or PNG.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Code EditorVS Code-style editor in your browser: tabs, 50+ languages, find/replace, autosave.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.ASCII Diagram EditorDraw boxes, arrows and text on a character grid and copy plain-text diagrams for code and READMEs.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.
    See all 53 Code Playgrounds & Testers →