PHPackages                             twipsi/normalizer - 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. twipsi/normalizer

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

twipsi/normalizer
=================

Provides a basic class to normalize and slugify strings

1.0.0(3y ago)031BSD-3-ClausePHPPHP &gt;=8.1

Since Sep 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Twipsi/normalizer)[ Packagist](https://packagist.org/packages/twipsi/normalizer)[ Docs](http://www.github.com/twipsi/normalizer)[ RSS](/packages/twipsi-normalizer/feed)WikiDiscussions main Synced 1mo ago

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

Normalizer
==========

[](#normalizer)

A very simple class to normalize and slugify a string or url.

Install
-------

[](#install)

```
composer require twipsi/normalizer

```

Usage
-----

[](#usage)

To just clean out html tags and line/tab spaces.

```
$string = "Hel  lo Wor
ld";

Normalizer::normalizeString($string);

Output: "Hello World"
```

You can also set the transliterate attribute to transliterate.

```
$string = "Hél  lö Wőr
ld";

Normalizer::normalizeString($string, true);

Output: "Hello World"
```

To slugify a string using default "\\/\_|+ -" characters as separation identifiers.

```
$string = "H\\él/ló|W_ö+r l-d";

Normalizer::slugifyString($string);

Output: "h-el-lo-w-o-r-l-d"
```

You can also specify your own separator.

```
$string = "H\\él/ló|W_ö+r l-d";

Normalizer::slugifyString($string, '_');

Output: "h_el_lo_w_o_r_l_d"
```

To slugify a url/path using default "\_|+ -" characters as separation identifiers.

```
$string = "https:://test.com/Tést page/Sep|ar_ate+Thís/?örg=éáő";
Normalizer::slugifyPath($string);

Output: "https:://test.com/test-page/sep-ar-ate-this/?org=eao"
```

You can also specify your own separator.

```
$string = "https:://test.com/Tést page/Sep|ar_ate+Thís/?örg=éáő";

Normalizer::slugifyPath($string, '_');

Output: "https:://test.com/test_page/sep_ar_ate_this/?org=eao"
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

1326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/880200baf15805538d0ea0c5235c033e173768cd401427482c46c650022e7818?d=identicon)[Twipsi](/maintainers/Twipsi)

---

Top Contributors

[![Twipsi](https://avatars.githubusercontent.com/u/72206204?v=4)](https://github.com/Twipsi "Twipsi (10 commits)")

---

Tags

slugifystringtransliterate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/twipsi-normalizer/health.svg)

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

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[danielstjules/stringy

A string manipulation library with multibyte support

2.4k26.0M191](/packages/danielstjules-stringy)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[coduo/php-to-string

Simple library that converts PHP value into strings

27112.7M10](/packages/coduo-php-to-string)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)

PHPackages © 2026

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