Back to Patterns
Network

URL Matching Regex

Matches standard HTTP and HTTPS URLs including paths and query parameters.

Pattern

/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g

Test Data

https://www.google.com http://example.org/path?q=123 not_a_url.com