--- id: url-normalize version: "3.0.0" license: MIT license_treatment: permissive maintenance: active --- # url-normalize — URL normalization for Python License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install url-normalize uv add url-normalize poetry add url-normalize ## Description # url-normalize [![tests](https://github.com/niksite/url-normalize/actions/workflows/ci.yml/badge.svg)](https://github.com/niksite/url-normalize/actions/workflows/ci.yml) [![Coveralls](https://img.shields.io/coveralls/github/niksite/url-normalize/master.svg)](https://coveralls.io/r/niksite/url-normalize) [![PyPI](https://img.shields.io/pypi/v/url-normalize.svg)](https://pypi.org/project/url-normalize/) [![Python Versions](https://img.shields.io/pypi/pyversions/url-normalize.svg)](https://pypi.org/project/url-normalize/) [![License](https://img.shields.io/pypi/l/url-normalize.svg)](https://github.com/niksite/url-normalize/blob/master/LICENSE) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) A Python library for standardizing and normalizing URLs. Ideal for database deduplication, caching, web crawling, and anywhere you need to ensure that equivalent URLs resolve to the exact same string. ```python from url_normalize import url_normalize # Fixes IDN, lowercases host/scheme, removes default ports, resolves path... ## AI interpretation — verify before relying Standardizes and normalizes URLs by handling internationalized domain names, lowercasing schemes/hosts, removing default ports, resolving path segments, and optionally filtering query parameters—useful for deduplication, caching, and web crawling. Verdict: A well-maintained, lightweight URL normalization library with RFC-compliant handling of IDN domains, path segments, and query parameters. No security issues, low install friction, and permissive licensing make it a solid choice for applications requiring robust URL standardization. [View on SkillFed](https://skillfed.io/packages/url-normalize) · [View on PyPI](https://pypi.org/project/url-normalize/)