The urls vocabulary implements a URL data type. The benefit of using a data type to prepresent URLs rather than a string is that the parsing, printing and escaping logic is encapsulated and reused, rather than re-implemented in a potentially buggy manner every time.
URL objects are used heavily by the http and furnace vocabularies, and are also useful on their own.
The URL implementation encodes and decodes components of url instances automatically, but sometimes this functionality is needed for non-URL strings. URL encoding and decoding