PHPackages                             league/uri - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. league/uri

ActiveLibrary[HTTP &amp; Networking](/categories/http)

league/uri
==========

URI manipulation library

7.8.1(2mo ago)1.1k206.4M↑10.1%7220MITPHPPHP ^8.1CI passing

Since Sep 23Pushed 2mo ago12 watchersCompare

[ Source](https://github.com/thephpleague/uri)[ Packagist](https://packagist.org/packages/league/uri)[ Docs](https://uri.thephpleague.com)[ GitHub Sponsors](https://github.com/sponsors/nyamsprod)[ RSS](/packages/league-uri/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (43)Used By (20)

URI
===

[](#uri)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/3ec28d6bb32e873e3682dc2fee08fb5369365dfc63c8fa0c5d6e75bdfee7285a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f7572692e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/uri/releases)[![Total Downloads](https://camo.githubusercontent.com/4a8ea8202d627f8423c7eee3b0ccb5ce42eeddb97cc9d6a77fb38d5d1d787903/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f7572692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/uri)

The `Uri` package provides simple and intuitive classes to manage URIs in PHP.

> ⚠️ this is a sub-split, for development, pull requests and issues, visit:

System Requirements
-------------------

[](#system-requirements)

You require **PHP &gt;= 8.1** but the latest stable version of PHP is recommended

Handling of an IDN host requires the presence of the `intl`extension or a polyfill for the `intl` IDN functions like the `symfony/polyfill-intl-idn` otherwise an exception will be thrown when attempting to validate or interact with such a host.

IPv4 conversion requires at least one of the following:

- the `GMP` extension,
- the `BCMatch` extension or
- a `64-bits` PHP version

otherwise, an exception will be thrown when attempting to convert a host as an IPv4 address.

Parsing or generating HTML related content requires the `dom` extension.

Dependencies
------------

[](#dependencies)

- [League URI Interfaces](https://github.com/thephpleague/uri-interfaces)
- [PSR-7](https://www.php-fig.org/psr/psr-7/)

Installation
------------

[](#installation)

```
$ composer require league/uri

```

Documentation
-------------

[](#documentation)

Full documentation can be found at [uri.thephpleague.com](https://uri.thephpleague.com).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

78

—

ExcellentBetter than 100% of packages

Maintenance87

Actively maintained with recent releases

Popularity78

Solid adoption and visibility

Community50

Growing community involvement

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~93 days

Recently: every ~116 days

Total

42

Last Release

64d ago

Major Versions

4.2.2 → 5.0.02017-02-06

4.2.3 → 5.1.02017-11-17

5.3.0 → 6.0.02019-10-18

6.8.0 → 7.0.0-beta.12023-06-26

PHP version history (8 changes)4.0.0PHP &gt;=5.5.9

5.0.0PHP &gt;=7.0

5.2.0PHP &gt;=7.0.13

6.0.0PHP ^7.2

6.3.0PHP &gt;=7.2

6.5.0PHP ^7.3 || ^8.0

6.6.0PHP ^7.4 || ^8.0

6.8.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/51073?v=4)[Ignace Nyamagana Butera](/maintainers/nyamsprod)[@nyamsprod](https://github.com/nyamsprod)

---

Top Contributors

[![nyamsprod](https://avatars.githubusercontent.com/u/51073?v=4)](https://github.com/nyamsprod "nyamsprod (1472 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (24 commits)")[![Fleshgrinder](https://avatars.githubusercontent.com/u/1059453?v=4)](https://github.com/Fleshgrinder "Fleshgrinder (15 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (8 commits)")[![jdreesen](https://avatars.githubusercontent.com/u/424602?v=4)](https://github.com/jdreesen "jdreesen (8 commits)")[![GwendolenLynch](https://avatars.githubusercontent.com/u/1427081?v=4)](https://github.com/GwendolenLynch "GwendolenLynch (6 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (5 commits)")[![pawelkg](https://avatars.githubusercontent.com/u/1854055?v=4)](https://github.com/pawelkg "pawelkg (4 commits)")[![rbayliss](https://avatars.githubusercontent.com/u/654407?v=4)](https://github.com/rbayliss "rbayliss (4 commits)")[![mdawaffe](https://avatars.githubusercontent.com/u/125994?v=4)](https://github.com/mdawaffe "mdawaffe (4 commits)")[![ntzm](https://avatars.githubusercontent.com/u/3888578?v=4)](https://github.com/ntzm "ntzm (3 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (3 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (3 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (3 commits)")[![Evan-R](https://avatars.githubusercontent.com/u/2487675?v=4)](https://github.com/Evan-R "Evan-R (2 commits)")[![EvaLok](https://avatars.githubusercontent.com/u/12283250?v=4)](https://github.com/EvaLok "EvaLok (2 commits)")[![makasim](https://avatars.githubusercontent.com/u/143206?v=4)](https://github.com/makasim "makasim (2 commits)")[![marijnvdwerf](https://avatars.githubusercontent.com/u/737603?v=4)](https://github.com/marijnvdwerf "marijnvdwerf (2 commits)")[![teohhanhui](https://avatars.githubusercontent.com/u/548843?v=4)](https://github.com/teohhanhui "teohhanhui (1 commits)")[![JoshuaBehrens](https://avatars.githubusercontent.com/u/1133593?v=4)](https://github.com/JoshuaBehrens "JoshuaBehrens (1 commits)")

---

Tags

parse-urlphppsr-7rfc-3986rfc-3987rfc-6570uriuri-parseruri-templatehttppsr-7urlurihttpsftphostnamedata-uriwsrfc3986parse\_urlrfc6570querystringquery-stringrfc3987parse\_strfile-urimiddlewareURNuri-templaterfc8141rfc2141

### Embed Badge

![Health badge](/badges/league-uri/health.svg)

```
[![Health](https://phpackages.com/badges/league-uri/health.svg)](https://phpackages.com/packages/league-uri)
```

###  Alternatives

[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[crwlr/url

Swiss Army knife for URLs.

11073.3k3](/packages/crwlr-url)[riimu/kit-urlparser

RFC 3986 compliant url parsing library with PSR-7 Uri component

33565.4k2](/packages/riimu-kit-urlparser)[bentools/querystring

Query String manipulation library. PHP 7.1+. No dependency, immutable, PSR-7 compliant.

1339.5k7](/packages/bentools-querystring)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
