Why it matters
URLPattern is the web platform's router syntax, used in service workers, Cloudflare Workers, Deno and speculation rules, and the same syntax as Express-style paths.
Check edge cases such as trailing slashes and optional segments before they reach production.
How to use it
- Type or paste your input; the example shows the format.
- Press Test pattern. Results also update as you type.
- Read the summary line, then the table, notes or output below it.
- Copy or download what you need. Nothing leaves this page.
FAQ
Which browsers support URLPattern?
Chromium browsers since version 95, plus Deno, Node 23.8+ and Cloudflare Workers. Others use this page's fallback matcher.
Does /books/:id match /books/42/?
No. Trailing slashes matter; use /books/:id{/}? to allow one.
Is my input uploaded?
No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.
Can I rely on the result?
It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.