Two models exist, and they are not interchangeable.
- RFC 3986 / RFC 9110 / RFC 6455: a grammar plus optional normalization steps (RFC 3986 §6). Invalid input is undefined.
- WHATWG URL Standard (https://url.spec.whatwg.org/): a parser (§4.4) that turns any string into a URL record or failure, and a serializer (§4.5). There is no separate "normalization" phase; what the parser does is the normalization. Its stated goal is to obsolete