PHPackages                             rechtlogisch/steuer-id - 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. rechtlogisch/steuer-id

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

rechtlogisch/steuer-id
======================

Validates the German Tax-ID (Steuerliche Identifikationsnummer)

v1.3.0(11mo ago)1650MITPHPPHP ^8.2CI passing

Since May 14Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/rechtlogisch/steuer-id)[ Packagist](https://packagist.org/packages/rechtlogisch/steuer-id)[ Docs](https://github.com/rechtlogisch/steuer-id)[ RSS](/packages/rechtlogisch-steuer-id/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

[![Recht logisch Steuer-ID banner image](rechtlogisch-steuer-id-banner.png)](rechtlogisch-steuer-id-banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/82ea46ec43801e9888cc1178111bb315fc0ada3349d58eedb6cebe14a0ac5404/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656368746c6f67697363682f7374657565722d69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rechtlogisch/steuer-id)[![Tests](https://github.com/rechtlogisch/steuer-id/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/rechtlogisch/steuer-id/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/cb2466d1b5035601f916cdc34bc5867339a0ba4234195ddbbe6d8b9655a583af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72656368746c6f67697363682f7374657565722d69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rechtlogisch/steuer-id)

steuer-id
=========

[](#steuer-id)

> Validates the German Tax-ID (Steuerliche Identifikationsnummer)

Based on the [official ELSTER documentation](https://download.elster.de/download/schnittstellen/Pruefung_der_Steuer_und_Steueridentifikatsnummer.pdf) (chapter: 2; as of 2025-02-24).

Note

This package validates solely the syntax and check digit of the provided input. It does not confirm, that the validated Steuer-ID was assigned to a person. Please contact the [Bundeszentralamt für Steuern](https://www.bzst.de/DE/Privatpersonen/SteuerlicheIdentifikationsnummer/steuerlicheidentifikationsnummer_node.html) in case you are unsure about your Steuer-ID.

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

[](#installation)

You can install the package via composer:

```
composer require rechtlogisch/steuer-id
```

Usage
-----

[](#usage)

```
isSteuerIdValid('02476291358'); // => true
```

or

```
use Rechtlogisch\SteuerId\SteuerId;

(new SteuerId('02476291358'))
    ->validate() // ValidationResult::class
    ->isValid(); // => true
```

### Test-Steuer-IDs

[](#test-steuer-ids)

Support for test Steuer-IDs (starting with `0`) is enabled by default. Test Steuer-IDs are typically invalid in production. It is recommended to disable them with the following environment variable:

```
STEUERID_PRODUCTION=true
```

or in PHP:

```
putenv('STEUERID_PRODUCTION=true');
```

Validation errors
-----------------

[](#validation-errors)

You can get a list of errors explaining why the provided input is invalid. The `validate()` method returns a DTO with a `getErrors()` method.

Note

The keys of `getErrors()` hold the stringified reference to the exception class. You can check for a particular error by comparing to the ::class constant. For example: `Rechtlogisch\UstId\Exceptions\InvalidUstIdLength::class`.

```
validateSteuerId('x2476291358')->getErrors();
// [
//   'Rechtlogisch\SteuerId\Exceptions\SteuerIdCanContainOnlyDigits'
//    => ['Only digits are allowed.']
// ]
```

or

```
use Rechtlogisch\SteuerId\SteuerId;

(new SteuerId('x2476291358'))
    ->validate() // ValidationResult::class
    ->getErrors();
// [
//   'Rechtlogisch\SteuerId\Exceptions\SteuerIdCanContainOnlyDigits'
//    => ['Only digits are allowed.']
// ]
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/rechtlogisch/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Krzysztof Tomasz Zembrowski](https://github.com/zembrowski)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82% 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 ~99 days

Total

5

Last Release

337d ago

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

v1.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f60f360e9d79540ea00427585d1b0063f2c1125ef8d22be6939428ffb68ccc1?d=identicon)[rechtlogisch](/maintainers/rechtlogisch)

---

Top Contributors

[![zembrowski](https://avatars.githubusercontent.com/u/2451083?v=4)](https://github.com/zembrowski "zembrowski (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")

---

Tags

germanyphpsteuer-idtax-idvalidategermanyrechtlogischtax-idsteuer-idsteuerliche identifikationsnummer

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rechtlogisch-steuer-id/health.svg)

```
[![Health](https://phpackages.com/badges/rechtlogisch-steuer-id/health.svg)](https://phpackages.com/packages/rechtlogisch-steuer-id)
```

###  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)
