PHPackages                             prinsfrank/mrtd - 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. prinsfrank/mrtd

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

prinsfrank/mrtd
===============

Machine-Readable Travel Document parser

v0.1(2y ago)462[2 PRs](https://github.com/PrinsFrank/MRTD/pulls)MITPHPPHP ^8.1 || ^8.2

Since Aug 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PrinsFrank/MRTD)[ Packagist](https://packagist.org/packages/prinsfrank/mrtd)[ RSS](/packages/prinsfrank-mrtd/feed)WikiDiscussions main Synced today

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

  ![Banner](docs/images/banner_light.png)MRTD - Machine Readable Travel Documents
========================================

[](#mrtd---machine-readable-travel-documents)

[![GitHub](https://camo.githubusercontent.com/d5e3f142328fd21514ab73d1f0b6e198fdffc4c58226611f66a71c356d239793/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7072696e736672616e6b2f4d525444)](https://camo.githubusercontent.com/d5e3f142328fd21514ab73d1f0b6e198fdffc4c58226611f66a71c356d239793/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7072696e736672616e6b2f4d525444)[![PHP Version Support](https://camo.githubusercontent.com/57c38e0a409e3811d4f02eb5973b38f9b0191aa130649256e83b5f5eb753941c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7072696e736672616e6b2f4d525444)](https://camo.githubusercontent.com/57c38e0a409e3811d4f02eb5973b38f9b0191aa130649256e83b5f5eb753941c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7072696e736672616e6b2f4d525444)

Machine Readable Travel Documents are everywhere. They are standardized by ICAO - the International Civil Aviation Organization, a United Nations specialized agency.

MRTDs are standardized in [Doc series 9303](https://www.icao.int/publications/pages/publication.aspx?docnum=9303).

This Package currently implements retrieving data from MRZ strings and checking data integrity by calculating check digits. It doesn't implement generating MRZ strings from data or checking data correctness from source data to encoded data. Feel free to contribute!

Setup
-----

[](#setup)

> **Note**Make sure you are running PHP 8.1 or higher to use this package

To start right away, run the following command in your composer project;

`composer require prinsfrank/mrtd`

Or for development only;

`composer require prinsfrank/mrtd --dev`

MRTD1
-----

[](#mrtd1)

Format as specified in [Doc 9303 Part 5](https://www.icao.int/publications/Documents/9303_p5_cons_en.pdf), Appendix B. (Hover for short descriptions)

  I&lt; UTO D23145890 7 &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;   740812 2 F 120415 9 UTO &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; 6   ERIKSSON&lt;&lt;ANNA&lt;MARIA&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; MRTD2
-----

[](#mrtd2)

Format as specified in [Doc 9303 Part 6](https://www.icao.int/publications/Documents/9303_p6_cons_en.pdf), Appendix B. (Hover for short descriptions)

  I&lt; UTO ERIKSSON&lt;&lt;ANNA&lt;MARIA&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;   D23145890 7 UTO 740812 2 F 120415 9 &lt;&lt;&lt;&lt;&lt;&lt;&lt; 6 MRTD3
-----

[](#mrtd3)

Format as specified in [Doc 9303 Part 4](https://www.icao.int/publications/Documents/9303_p4_cons_en.pdf), Appendix B. (Hover for short descriptions)

  P&lt; UTO ERIKSSON&lt;&lt;ANNA&lt;MARIA&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;   L898902C3 7 UTO 740812 2 F 120415 9 ZE184226B&lt;&lt;&lt;&lt;&lt; 1 0

###  Health Score

24

↑

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

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

1063d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/288919c24dc651727390578a2bfe6ef020f6f508c30db717b54c943a9e2ac0b3?d=identicon)[PrinsFrank](/maintainers/PrinsFrank)

---

Top Contributors

[![PrinsFrank](https://avatars.githubusercontent.com/u/25006490?v=4)](https://github.com/PrinsFrank "PrinsFrank (30 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (8 commits)")

---

Tags

mrtdmrtd-parsermrzmrz-parser

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/prinsfrank-mrtd/health.svg)

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M45](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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