PHPackages                             phillipsdata/vin - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. phillipsdata/vin

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

phillipsdata/vin
================

VIN (Vehicle Identification Number) validation and diagnostic library

1.0.0(10y ago)2344.9k↓35.5%4[2 issues](https://github.com/phillipsdata/vin/issues)MITPHPPHP &gt;=5.3.0

Since Jan 7Pushed 10y ago8 watchersCompare

[ Source](https://github.com/phillipsdata/vin)[ Packagist](https://packagist.org/packages/phillipsdata/vin)[ RSS](/packages/phillipsdata-vin/feed)WikiDiscussions master Synced 1mo ago

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

VIN
===

[](#vin)

[![Build Status](https://camo.githubusercontent.com/bb7de9c5a2c7d7b5810814e68db519a4d5e07f6549b26fc029711de3fb50d722/68747470733a2f2f7472617669732d63692e6f72672f7068696c6c697073646174612f76696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phillipsdata/vin) [![Coverage Status](https://camo.githubusercontent.com/d913ea795158fcfd4108a27e32e5a916fbfa53b5053edfd8b41901fa6fe13790/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7068696c6c697073646174612f76696e2f62616467652e737667)](https://coveralls.io/r/phillipsdata/vin)

VIN (Vehicle Identification Number) validation and diagnostic library.

### Features

[](#features)

- Validates North American VIN numbers.
- Returns all possible years of manfacture for North American VIN numbers.
- Returns the country of manufacturer for VINs defined by ISO 3779.
- Supports custom readers for validating VINs outside of North America.

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

[](#installation)

Install via composer:

```
composer require phillipsdata/vin
```

Basic Usage
-----------

[](#basic-usage)

```
use PhillipsData\Vin\Number;

$vin = new Number('1M8GDM9AXKP042788');

$vin->valid(); // returns whether the VIN is valid
$vin->country(); // returns the ISO 3166 country code for the country of origin
$vin->number(); // returns the VIN number (e.g. 1M8GDM9AXKP042788)
$vin->year(); // returns an array of possible manufacturer years
```

Advanced Usage
--------------

[](#advanced-usage)

You can supply your own VIN reader. This allows you to implement a VIN reader for vehicles manufactured in other countries (outside of North America).

```
use PhillipsData\Vin\Number;

$vin = new Number('1M8GDM9AXKP042788', new PhillipsData\Vin\Reader\NorthAmerica());

$reader = $vin->reader(); // returns instance of PhillipsData\Vin\Reader\ReaderInterface
```

Contributions
-------------

[](#contributions)

We're interested in contributions that add additional `PhillipsData\Vin\Reader\ReaderInterface`implementations for unsupported regions.

We'd also love for this library to support extracting Manufacturer (e.g. Ford, Chevrolet, etc.) based on the SAE's assignment of world manufacturer identifiers.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

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

3784d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f87ae869d67f48673504d6cba1adcb8945a3ba8280798917e18b7c744009fc2?d=identicon)[clphillips](/maintainers/clphillips)

![](https://www.gravatar.com/avatar/e1100c7dbee65c40edf82c25a4b7d5a34bd677ff86263396ca2ac5163da1dbe0?d=identicon)[tysonphillips](/maintainers/tysonphillips)

![](https://www.gravatar.com/avatar/b73da57e4fcb22c7d7f459b2bd00ea7bceb6252df0cd14e2d0bf4b6a145709fc?d=identicon)[paulphillips](/maintainers/paulphillips)

---

Top Contributors

[![clphillips](https://avatars.githubusercontent.com/u/682986?v=4)](https://github.com/clphillips "clphillips (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phillipsdata-vin/health.svg)

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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