categories.regex.title

regex-url

All-in-one developer toolkit with 50+ free online tools. JSON formatter, Regex tester, Base64 encoder, QR code generator, Markdown editor, Color converter, Unit converter, CSS generator, and more. 100% client-side, privacy-first.

regexurlvalidateurl validatorlink

URL Validator

Strict mode (HTTP/HTTPS required)

Regular Expression

/^(https?:\/\/|ftp:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?(\?[^\s]*)?(#[^\s]*)?$/i

Sample URLs

https://example.com
https://www.example.com/path/to/page
https://example.com?query=value&foo=bar
https://example.com#section
http://sub.example.com/path?q=1#hash
ftp://files.example.com
example.com
not a url
http://
https://example.com/very/long/path/with/many/segments?key=value&another=test#fragment