PHPackages                             koenschipper/laravel-address-parser - 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. koenschipper/laravel-address-parser

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

koenschipper/laravel-address-parser
===================================

Laravel address parser to parse dutch addresses.

v1.0.1(3mo ago)171[1 PRs](https://github.com/koen-schipper/laravel-address-parser/pulls)MITPHPPHP ^8.3 || ^8.4 || ^8.5CI passing

Since Apr 10Pushed 1mo agoCompare

[ Source](https://github.com/koen-schipper/laravel-address-parser)[ Packagist](https://packagist.org/packages/koenschipper/laravel-address-parser)[ Docs](https://github.com/koenschipper/laravel-address-parser)[ GitHub Sponsors](https://github.com/KoenSchipper)[ RSS](/packages/koenschipper-laravel-address-parser/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

Laravel Dutch Address Parser
============================

[](#laravel-dutch-address-parser)

[![Latest Version on Packagist](https://camo.githubusercontent.com/83e0de86c8dc8edd6e9edb92fc159e06084c936a02c4a98f71d08a3155cf7296/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f656e73636869707065722f6c61726176656c2d616464726573732d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/koenschipper/laravel-address-parser)[![GitHub Tests Action Status](https://camo.githubusercontent.com/bd64c16279adf54efde8ee188e608bbb4376471861cc56ccb2c0be015b073272/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6f656e73636869707065722f6c61726176656c2d616464726573732d7061727365722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/koenschipper/laravel-address-parser/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ab417e77194657da0584fbf1192acc7f6c7fd0459e516ee08030bd936799ee86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6f656e73636869707065722f6c61726176656c2d616464726573732d7061727365722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/koenschipper/laravel-address-parser/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a617910590b61a3a2f7a8a973bc4a39fdd6050d4e8b383303a8f625d431a3b38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f656e73636869707065722f6c61726176656c2d616464726573732d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/koenschipper/laravel-address-parser)

A robust and simple Laravel package for parsing Dutch address data. This parser separates street names, house numbers, additions, postcodes, and cities from a single text string, even with complex formats.

Features
--------

[](#features)

- **Robust parsing**: Supports complex house number additions (e.g., `12 bis`, `12-a`, `12 rood`, `1/2`).
- **Smart recognition**: Works even without spaces between street and house number (e.g., `Kerkstraat12`).
- **Postcodes &amp; Cities**: Recognizes and separates Dutch postcodes (`1234 AB`) and cities.
- **Special Addresses**: Also supports `Postbus` (PO Box) and `Antwoordnummer` formats.
- **Laravel Optimized**: Includes Facade, Helper, Validation Rule, and Artisan Command.
- **Address DTO**: Returns a structured `Address` object that is `Arrayable` and `JsonSerializable`.

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

[](#installation)

You can install the package via composer:

```
composer require koenschipper/laravel-address-parser
```

You can publish the config file with (optional):

```
php artisan vendor:publish --tag="laravel-address-parser-config"
```

Usage
-----

[](#usage)

You can use the parser via the Facade, the helper function, or the Artisan command.

### Usage via Facade

[](#usage-via-facade)

The `LaravelAddressParser::parse()` method returns an `Address` object.

```
use KoenSchipper\AddressParser\Facades\LaravelAddressParser;

// Full address
$address = LaravelAddressParser::parse('Kerkstraat 1, 1234 AB Amsterdam');

echo $address->street;               // Kerkstraat
echo $address->houseNumber;          // 1
echo $address->houseNumberAddition;  // (empty)
echo $address->fullHouseNumber;      // 1
echo $address->postcode;             // 1234 AB
echo $address->city;                 // Amsterdam

// More complex example
$address = LaravelAddressParser::parse('Laan 1940-1945 10 bis, 1234AB Utrecht');

echo $address->street;               // Laan 1940-1945
echo $address->houseNumber;          // 10
echo $address->houseNumberAddition;  // bis
echo $address->fullHouseNumber;      // 10 bis
echo $address->postcode;             // 1234 AB
echo $address->city;                 // Utrecht
```

### Usage via Helper

[](#usage-via-helper)

For quick access, you can use the helper function:

```
$address = parse_dutch_address('Kerkstraat 1, 1234 AB Amsterdam');
```

### Street and Number Only (Array)

[](#street-and-number-only-array)

If you only want the street and the house number as a simple array:

```
$result = LaravelAddressParser::parseAddress('Kerkstraat 1');
// [
//     'street' => 'Kerkstraat',
//     'house_number' => '1'
// ]
```

### Validation in Laravel

[](#validation-in-laravel)

You can use the included validation rule in your Request classes or controllers:

```
use KoenSchipper\AddressParser\Rules\DutchAddress;

$request->validate([
    'address' => ['required', new DutchAddress],
]);
```

### Artisan Command

[](#artisan-command)

Test addresses directly from your terminal:

```
php artisan address:parse "Kerkstraat 1, 1234 AB Amsterdam"
```

Address Object Properties
-------------------------

[](#address-object-properties)

The `Address` object has the following properties:

- `street`: The street name.
- `houseNumber`: Only the numerical part of the house number.
- `houseNumberAddition`: The addition (e.g., 'bis' or 'a').
- `fullHouseNumber`: House number including addition.
- `postcode`: Formatted postcode (`1234 AB`).
- `city`: The city or place of residence.

The object can also be converted to an array or JSON (with snake\_case keys):

```
$address->toArray();
/*
[
    'street' => 'Kerkstraat',
    'house_number' => '1',
    'house_number_addition' => '',
    'full_house_number' => '1',
    'postcode' => '1234 AB',
    'city' => 'Amsterdam'
]
*/

$address->toJson();
```

Testing
-------

[](#testing)

```
composer test
```

Need a Laravel Developer?
-------------------------

[](#need-a-laravel-developer)

If you're looking for a dedicated Laravel developer to help you with your project, feel free to reach out via my website: [koenschipper.com](https://koenschipper.com).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Koen Schipper](https://github.com/koen-schipper)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

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

Every ~12 days

Total

2

Last Release

93d ago

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.0.1PHP ^8.3 || ^8.4 || ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/1279c283054fb742ffd97da3ce0b010841d672461e07554fe7cf5420913c262d?d=identicon)[koenschipper](/maintainers/koenschipper)

---

Top Contributors

[![koen-schipper](https://avatars.githubusercontent.com/u/56150397?v=4)](https://github.com/koen-schipper "koen-schipper (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laraveladdress-parserkoenschipper

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/koenschipper-laravel-address-parser/health.svg)

```
[![Health](https://phpackages.com/badges/koenschipper-laravel-address-parser/health.svg)](https://phpackages.com/packages/koenschipper-laravel-address-parser)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M48](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

330530.5k30](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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