PHPackages                             leadsolution/phone-number-normalizer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. leadsolution/phone-number-normalizer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

leadsolution/phone-number-normalizer
====================================

Normalizes Brazilian Phone Numbers.

v0.1.1(5y ago)61691[1 PRs](https://github.com/leadsolution/phone-number-normalizer/pulls)MITPHP

Since Jun 10Pushed 5y agoCompare

[ Source](https://github.com/leadsolution/phone-number-normalizer)[ Packagist](https://packagist.org/packages/leadsolution/phone-number-normalizer)[ RSS](/packages/leadsolution-phone-number-normalizer/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

*Phone Number Normalizer* [![CI](https://github.com/leadsolution/phone-number-normalizer/workflows/CI/badge.svg)](https://github.com/leadsolution/phone-number-normalizer/workflows/CI/badge.svg)
=================================================================================================================================================================================================

[](#phone-number-normalizer-)

📞 It tries to normalize a phone number from whatever **\*** input it receives.
**\****(can't do magic, if you got a new case, feel free to open an issue or a PR)*.

Install
-------

[](#install)

```
composer require leadsolution/phone-number-normalizer
```

Usage examples
--------------

[](#usage-examples)

```
use Leadsolution\PhoneNumber\Normalizer;
$normalizer = new Normalizer();
```

Removes non-digits

```
$normalizer->normalize('2345-6789')->toString();
// 23456789

$normalizer->normalize('(11) 2345-6789')->toString();
// 1123456789
```

Adds default national codes

```
$normalizer->normalize('2345-6789', '11')->toString();
// 1123456789
```

Removes international codes

```
$normalizer->normalize('+55 (11) 2345-6789')->toString();
// 1123456789
```

Adds the 9 digit on mobile numbers

```
$normalizer->normalize('7345-6789', '11')->toString();
// 11973456789
```

Checks if the returned object is a mobile

```
$normalizer->normalize('987654321')->isMobile();
// true

$normalizer->normalize('23456789')->isMobile();
// false
```

---

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/940717934113da7abe00589e87cfde6f34496f039bcd3fc6ce4a33f5f415d4ac?d=identicon)[leocavalcante](/maintainers/leocavalcante)

---

Top Contributors

[![leocavalcante](https://avatars.githubusercontent.com/u/183722?v=4)](https://github.com/leocavalcante "leocavalcante (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leadsolution-phone-number-normalizer/health.svg)

```
[![Health](https://phpackages.com/badges/leadsolution-phone-number-normalizer/health.svg)](https://phpackages.com/packages/leadsolution-phone-number-normalizer)
```

PHPackages © 2026

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