PHPackages                             vstelmakh/url-highlight - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. vstelmakh/url-highlight

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

vstelmakh/url-highlight
=======================

Library to parse urls from string input

v3.1.3(7mo ago)102849.1k—6.6%1[1 issues](https://github.com/vstelmakh/url-highlight/issues)8MITPHPPHP ^7.1 || ^8CI passing

Since Dec 22Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/vstelmakh/url-highlight)[ Packagist](https://packagist.org/packages/vstelmakh/url-highlight)[ Docs](https://github.com/vstelmakh/url-highlight)[ RSS](/packages/vstelmakh-url-highlight/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (22)Used By (8)

[![Url highlight logo](./resources/url-highlight-logo.svg)](./resources/url-highlight-logo.svg)

---

[![Build status](https://github.com/vstelmakh/url-highlight/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/vstelmakh/url-highlight/actions/workflows/build.yml)[![Packagist version](https://camo.githubusercontent.com/61d4d30f8c54c4249f9bf5aa70ba388c6fee963c0bf82c4216c0c31e40ae47c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f767374656c6d616b682f75726c2d686967686c696768743f636f6c6f723d6f72616e6765)](https://packagist.org/packages/vstelmakh/url-highlight)[![PHP version](https://camo.githubusercontent.com/19720f1f9433ddf712597a357786064c029cba05448d3982023bedd0bbbe0716/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f767374656c6d616b682f75726c2d686967686c69676874)](https://www.php.net/)[![License](https://camo.githubusercontent.com/ba48704f642bcc0891317a2f6863b0c8a53fe9625c0ed8ee4069478d60181131/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f767374656c6d616b682f75726c2d686967686c696768743f636f6c6f723d79656c6c6f77677265656e)](LICENSE)

**Url highlight** - PHP library to parse URLs from string input. Works with complex URLs, edge cases and encoded input.

Features:

- Replace URLs in string by HTML tags (make clickable)
- Match URLs without scheme by top-level domain
- Work with HTML entities encoded input
- Extract URLs from string
- Check if string is URL

[🚀 **See examples** 👀](./docs/examples.md)

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

[](#installation)

Install the latest version with [Composer](https://getcomposer.org/):

```
composer require vstelmakh/url-highlight
```

Also, there are [![Twig logo](./resources/twig-logo.png) Twig extension](https://github.com/vstelmakh/url-highlight-twig-extension)and [![Symfony logo](./resources/symfony-logo.png) Symfony bundle](https://github.com/vstelmakh/url-highlight-symfony-bundle) available.

Quick start
-----------

[](#quick-start)

```
