# Function normalizeUrl

- normalizeUrl(urlString: string, opts?: Options): string

- Normalize a URL.

  URLs with custom protocols are not normalized and just passed through by default. Supported protocols are: `https`, `http`, `file`, and `data`.

  #### Parameters

  - urlString: string
  - `Optional` opts: Options

  #### Returns string

  #### Example

      import normalizeUrl from 'normalize-url';

      normalizeUrl('sindresorhus.com');
      //=> 'http://sindresorhus.com'

      normalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo');
      //=> 'http://sindresorhus.com/baz?a=foo&b=bar'

  - Defined in packages/lib/src/normalize-url/index.ts:374