Match pattern tester
Type a Chrome extension match pattern and a URL. The page tells you if the pattern matches the URL, and which part decided the result: the scheme, the host, the port or the path. It also tells you why a pattern is invalid.
The tool tests the documented match pattern syntax of Google's match patterns page (read 2026-10-10). It does not test exclude_matches, globs (include_globs, exclude_globs) or declarativeNetRequest filters. The test runs in your browser.
Test a pattern
Test many URLs
Paste one URL on each line. The page tests each URL against the pattern in the box above.
The documented examples as live tests
Each row below is an example from Google's match patterns page (read 2026-10-10). The last column shows the result that this tester gives in your browser now.
| Pattern | URL | Documentation | This tester |
|---|---|---|---|
https://*/* | https://example.com/foo/bar.html | Matches any URL using the https scheme. | Needs JavaScript |
https://*/ | https://example.com/ | Matches any URL using the https scheme. | Needs JavaScript |
https://*/foo* | https://example.com/foo/bar.html | Example of a match. | Needs JavaScript |
https://*/foo* | https://www.google.com/foo | Example of a match. | Needs JavaScript |
https://*.google.com/foo*bar | https://www.google.com/foo/baz/bar | Example of a match. | Needs JavaScript |
https://*.google.com/foo*bar | https://docs.google.com/foobar | Example of a match. | Needs JavaScript |
file:///foo* | file:///foo/bar.html | Example of a match. | Needs JavaScript |
file:///foo* | file:///foo | Example of a match. | Needs JavaScript |
http://127.0.0.1/* | http://127.0.0.1/ | Example of a match. | Needs JavaScript |
http://127.0.0.1/* | http://127.0.0.1/foo/bar.html | Example of a match. | Needs JavaScript |
http://127.0.0.1/ | http://127.0.0.1/ | Example of a match. | Needs JavaScript |
http://localhost/* | http://localhost:8080/ | Matches any localhost port. | Needs JavaScript |
http://localhost/* | http://localhost:3000/ | Matches any localhost port. | Needs JavaScript |
*://mail.google.com/* | http://mail.google.com/ | Matches any URL that starts with http://mail.google.com or https://mail.google.com. | Needs JavaScript |
*://mail.google.com/* | https://mail.google.com/mail/ | Matches any URL that starts with http://mail.google.com or https://mail.google.com. | Needs JavaScript |
*://mail.google.com/ | https://mail.google.com/ | Matches any URL that starts with http://mail.google.com or https://mail.google.com. | Needs JavaScript |
<all_urls> | https://example.com/foo/bar.html | Matches any URL that starts with a permitted scheme. | Needs JavaScript |
<all_urls> | file:///foo/bar.html | Matches any URL that starts with a permitted scheme. | Needs JavaScript |
The documentation shows some patterns in two forms, for example https://*/* or https://*/. It also says: "For host permissions, the path is required but ignored." This tester always compares the path, as the function MatchesURL in Chromium's url_pattern.cc does (read 2026-10-10). Thus the short form https://*/ matches only the root path / in this tester. Use the form with /* to match all paths.
The rules that the tester applies
The documentation gives the structure of a match pattern as <scheme>://<host>:<port>/<path>. The port is optional. The sources below were read on 2026-10-10.
| Part | Rule | Source |
|---|---|---|
| Scheme | The scheme must be http, https, file or *. The wildcard * matches only http or https. The characters :// must follow the scheme. The tester rejects all other schemes, for example ftp, ws, data, about, urn and chrome-extension. | Google, match patterns, read 2026-10-10 |
| Host | The host is a host name, or *. before a host name to match subdomains, or * alone. A wildcard in the host must be the first or only character. A period or a forward slash must follow it. | Google, match patterns, read 2026-10-10 |
| Host | *.example.com also matches example.com itself. A subdomain wildcard does not match an IP address. The comparison of host names ignores letter case. | Chromium, url_pattern.cc (functions Parse and MatchesHost), read 2026-10-10 |
| Port | The port is optional. A pattern without a port matches all ports. A pattern with a port, for example http://localhost:8080/*, matches only that port. | Google, match patterns, read 2026-10-10 |
| Port | A port must be * or a number from 0 to 65535. | Chromium, url_pattern.cc (function IsValidPortForScheme), read 2026-10-10 |
| Path | The path is required. https://example.com without a path is invalid. For host permissions, Chrome ignores the path, and the documentation recommends /*. | Google, match patterns, read 2026-10-10 |
| Path | A * in the path matches zero or more characters. All other characters are literal. The comparison is case-sensitive. The query string is part of the path that the tester compares. The fragment (the part after #) is not. | Chromium, url_pattern.cc (functions MatchesURL and MatchesPath), read 2026-10-10 |
<all_urls> | The special pattern <all_urls> matches any URL that starts with a permitted scheme. In this tester the permitted schemes are http, https and file. | Google, match patterns, read 2026-10-10 |
file:/// | A file pattern has three slashes and no host. The user must manually grant access to local files. | Google, match patterns, read 2026-10-10 |
Patterns that are invalid
https://example.comhas no path. Writehttps://example.com/*.https://www.google.*/*has a wildcard that is not the first character of the host. The documentation says that Chrome does not support match patterns for top-level domains. Write one pattern for each domain, as inhttp://google.es/*andhttp://google.fr/*.https://*foo.example.com/*has a wildcard that a period does not follow. Writehttps://*.example.com/*.file://foo*has two slashes. Writefile:///foo*.ftp://example.com/*has a scheme that the documentation does not list.
Limits of this tester
Is this the code that Chrome runs?
No. The tester is a separate JavaScript implementation of the documented rules. Chromium's parser in url_pattern.cc (read 2026-10-10) knows more schemes than the documentation lists, for example ftp, ws, wss and data. It has special handling for filesystem URLs. It also accepts a file pattern that has a host. The tester does not cover these cases. For an unusual host name or an unusual percent-escape, the result can differ from Chrome.
Where does a manifest use match patterns?
The documentation names these uses: to inject content scripts, to declare host permissions, to grant access to web-accessible resources, and in the externally_connectable.matches manifest key. Google's Declare permissions page (read 2026-10-10) says that a change of the match patterns in host_permissions or content_scripts.matches triggers a warning. To see the host patterns of a packed extension, open it in the CRX viewer. To check the icon, screenshots and promo tiles of a store listing, use the Chrome Web Store image size checker. To check a keyboard shortcut in the manifest's commands block, use the keyboard shortcut checker.
Does the query string take part in the match?
Yes. The pattern https://example.com/foo does not match https://example.com/foo?x=1. The pattern https://example.com/foo* matches it. The fragment does not take part.