URL Pattern Tester

Test one absolute HTTP(S) URL against a local URL pattern and inspect named groups.

ReadyRuns in your browser
INPUT & CONTROLS

Prepare your input

Local processing

A string pattern such as https://example.com/books/:id constrains protocol, hostname, and pathname. Username and password are constrained only when @ is in the authority. An explicit port, a ? search, and a # hash are constrained only when they appear. Other omissions are wildcards. Component JSON must start with { and may include protocol, username, password, hostname, port, pathname, search, and hash. Omitted JSON components are wildcards. The page location is never used as a base.

The subset pathname grammar is slash-separated literals, :name, :name?, *, *name, and *name?. A pathname that is * or *name captures the whole pathname. :name matches one non-empty segment and does not cross slashes. Optional tokens may be skipped, and an unmatched optional group is null. Regexp groups, custom modifiers, relative patterns, a nonempty base, and mixed literal-token segments are outside the subset. When this runtime provides URLPattern, string patterns and component JSON use it, including syntax the subset rejects, and a relative string pattern can use the base field. Native failure does not fall back to the subset. Subset ignoreCase folds ASCII literals only.

Limits: pattern 8,192 UTF-16 units; URL 32,768; base 2,048; each component pattern 2,048; 128 slash segments; 12 optional pathname tokens; 64 groups; 64-unit names; 4,096-unit captured values; result JSON 65,536. Raw controls and malformed UTF-16 reject. Group names are data, including prototype-looking names. Browser textarea line endings can normalize before matching. Hostname, credentials, default ports, IDNA, IPv6 spelling, and dot segments follow this runtime URL parser. String patterns are parsed as URLs before pathname tokens are read. JSON pathname text stays literal. A match is not a safety or reachability check.

Runs locally with bounded URL pattern matching. No navigation, DNS resolution, network request, or storage.

Result

Your result starts here

Review the input and selected options, then use the primary action. Output and any validation messages will appear here.

METHOD & CONTEXT

Understand the result before using it.

How it works

Matches one absolute HTTP(S) URL with runtime URLPattern when present, otherwise with the documented pathname subset, and returns ordered groups as JSON text.

Interpretation

Read the result summary first, then inspect the detailed output and any errors or warnings. The result describes the supplied input and selected options. Changing input requires another run.

Assumptions & warnings

Native and subset syntax differ, and native failure does not fall back. Canonical host, port, credentials, IDNA, and dot segments follow this runtime. A match does not navigate, contact the host, or prove the URL is safe.

Inputs are processed in your browser. Follow the input format and size limits shown next to the controls.

Try an example

Select Load example in the input panel, review the selected mode, then use its displayed primary action. Inspect the result before replacing the sample with your own input.

Related utilities for the next step in your task.

Explore Developer Utilities →