PHPackages                             wesley0010012/brazilian-plate-converter - 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. wesley0010012/brazilian-plate-converter

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

wesley0010012/brazilian-plate-converter
=======================================

PHP Brazilian Plate Converter package

1.0.0(10mo ago)01MITPHP

Since Jul 5Pushed 10mo agoCompare

[ Source](https://github.com/Wesley0010012/BrazilianPlateConverter)[ Packagist](https://packagist.org/packages/wesley0010012/brazilian-plate-converter)[ RSS](/packages/wesley0010012-brazilian-plate-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

🇧🇷 Brazilian Plate Converter
============================

[](#-brazilian-plate-converter)

**Brazilian Plate Converter** is a PHP library that allows validation and conversion between the two main Brazilian vehicle license plate formats:

- **National Format**: `ABC1234`
- **Mercosul Format**: `ABC1C34`

✨ Features
----------

[](#-features)

- Validate whether a license plate is in a valid Brazilian format
- Detect if a plate is in Mercosul or National format
- Convert National format to Mercosul format
- Convert Mercosul format to National format
- Configurable error handling via environment variable

📦 Installation
--------------

[](#-installation)

Requires PHP 8.1+ and [Composer](https://getcomposer.org):

```
composer require wesley0010012/brazilian-plate-converter
```

🧪 Usage Example
---------------

[](#-usage-example)

```
use Wesley0010012\BrazilianPlateConverter\BrazilianPlateConverter;

require_once(__DIR__ . "/vendor/autoload.php");

function convertBoolToText(bool $value): string {
    return $value ? 'YES' : 'NO';
}

$plate = "ABC1234";

echo "Is valid plate? " . convertBoolToText(BrazilianPlateConverter::isPlate($plate)) . PHP_EOL;
echo "Is Mercosul? " . convertBoolToText(BrazilianPlateConverter::isMercosul($plate)) . PHP_EOL;
echo "Is National? " . convertBoolToText(BrazilianPlateConverter::isNational($plate)) . PHP_EOL;

echo "To Mercosul: " . BrazilianPlateConverter::toMercosul($plate) . PHP_EOL;
echo "To National: " . BrazilianPlateConverter::toNational($plate) . PHP_EOL;
```

You can directly build without the main component, using BuilderClass:

```
use Wesley0010012\BrazilianPlateConverter\Impl\Builder\BrazilianPlateConverterFacadeBuilder;

require_once(__DIR__ . "/../vendor/autoload.php");

function convertBoolToText(bool $value)
{
    return $value ? 'YES' : 'NO';
}

$facade = (new BrazilianPlateConverterFacadeBuilder())->build();

$plate = "ABC1234";

echo "Is valid plate? " . convertBoolToText($facade->isPlate($plate)) . PHP_EOL;
echo "Is Mercosul? " . convertBoolToText($facade->isMercosul($plate)) . PHP_EOL;
echo "Is National? " . convertBoolToText($facade->isNational($plate)) . PHP_EOL;

echo "To Mercosul: " . $facade->toMercosul($plate) . PHP_EOL;
echo "To National: " . $facade->toNational($plate) . PHP_EOL;
```

⚙️ Environment Variable
-----------------------

[](#️-environment-variable)

You can control whether the library should throw exceptions on invalid operations using the environment variable:

```
BRAZILIAN_PLATE_CONVERTER_THROW_ERROR=true
```

Set to `true` to throw exceptions, or `false` to silently return fallback values.

🧑‍💻 Author
----------

[](#‍-author)

**Wesley0010012**
📧

📄 License
---------

[](#-license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance54

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f9e47d87f9151b4479a223ae7eb87fd2671f3fc0c37b50e475e1af930016374?d=identicon)[Wesley0010012](/maintainers/Wesley0010012)

---

Top Contributors

[![Wesley0010012](https://avatars.githubusercontent.com/u/66687111?v=4)](https://github.com/Wesley0010012 "Wesley0010012 (17 commits)")

### Embed Badge

![Health badge](/badges/wesley0010012-brazilian-plate-converter/health.svg)

```
[![Health](https://phpackages.com/badges/wesley0010012-brazilian-plate-converter/health.svg)](https://phpackages.com/packages/wesley0010012-brazilian-plate-converter)
```

PHPackages © 2026

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