PHPackages                             ibrahim-bougaoua/numbertowords - 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. ibrahim-bougaoua/numbertowords

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

ibrahim-bougaoua/numbertowords
==============================

converting numbers to words

v1.0.0(2y ago)114[4 PRs](https://github.com/ibrahimBougaoua/numberToWords/pulls)MITPHPPHP ^8.2CI passing

Since Jul 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ibrahimBougaoua/numberToWords)[ Packagist](https://packagist.org/packages/ibrahim-bougaoua/numbertowords)[ Docs](https://github.com/ibrahim-bougaoua/numbertowords)[ GitHub Sponsors]()[ RSS](/packages/ibrahim-bougaoua-numbertowords/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (13)Versions (7)Used By (0)

Converting between numbers and words.
=====================================

[](#converting-between-numbers-and-words)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45393584e1142327504c3978ec48b5869b719814187904188d4b5d8c4130d853/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6962726168696d2d626f7567616f75612f6e756d626572746f776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ibrahim-bougaoua/numbertowords)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f70392d72fdd23d40b856f05fe4975cba12b0150aa1b3a350dbdd89886bc76f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6962726168696d2d626f7567616f75612f6e756d626572746f776f7264732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ibrahim-bougaoua/numbertowords/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9d98b90e013bedecd9cfc7659cb05c9002f82623e42e2e453c824effdfc73d2b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6962726168696d2d626f7567616f75612f6e756d626572746f776f7264732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ibrahim-bougaoua/numbertowords/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d889627f5d0425cb872208fa3b0e851ec0dad8cff0682960ee7c89028e613dd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6962726168696d2d626f7567616f75612f6e756d626572746f776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ibrahim-bougaoua/numbertowords)

The words-to-number and number-to-words conversion functionality enables users to seamlessly switch between numeric values and their worded equivalents in various languages. This feature supports multiple languages, including English, French, Arabic, Spanish, German, and Italian.

[Youtube Video](https://www.youtube.com/@IbrahimBougaoua)

[![](https://raw.githubusercontent.com/ibrahimBougaoua/screenshot/main/wordsToNumbers.jpg)](https://raw.githubusercontent.com/ibrahimBougaoua/screenshot/main/wordsToNumbers.jpg)

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

[](#installation)

You can install the package via composer:

```
composer require ibrahim-bougaoua/numbertowords
```

You can publish the config file with:

```
php artisan vendor:publish --tag="numbertowords-config"
```

This is the contents of the published config file:

```
return [
    // default lang
    'lang' => 'en',

    'words' => [

        // Arabic words
        'units_ar' => ['', 'واحد', 'اثنان', 'ثلاثة', 'أربعة', 'خمسة', 'ستة', 'سبعة', 'ثمانية', 'تسعة'],
        'teens_ar' => ['عشرة', 'أحد عشر', 'اثنا عشر', 'ثلاثة عشر', 'أربعة عشر', 'خمسة عشر', 'ستة عشر', 'سبعة عشر', 'ثمانية عشر', 'تسعة عشر'],
        'tens_ar' => ['', 'عشرة', 'عشرون', 'ثلاثون', 'أربعون', 'خمسون', 'ستون', 'سبعون', 'ثمانون', 'تسعون'],
        'thousands_ar' => ['', 'ألف', 'مليون', 'مليار', 'بليون'],
        'zero_ar' => 'صفر',
        'negative_ar' => 'سالب ',
        'hundred_ar' => ' مائة ',
        'and_ar' => ' و ',
        'cents_ar' => ' قروش',

        // English words
        'units_en' => ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine'],
        'teens_en' => ['Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen'],
        'tens_en' => ['', 'Ten', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'],
        'thousands_en' => ['', 'Thousand', 'Million', 'Billion', 'Trillion'],
        'zero_en' => 'Zero',
        'negative_en' => 'Negative ',
        'hundred_en' => ' Hundred ',
        'and_en' => ' and ',
        'cents_en' => ' Cents',

        // French words
        'units_fr' => ['', 'Un', 'Deux', 'Trois', 'Quatre', 'Cinq', 'Six', 'Sept', 'Huit', 'Neuf'],
        'teens_fr' => ['Dix', 'Onze', 'Douze', 'Treize', 'Quatorze', 'Quinze', 'Seize', 'Dix-sept', 'Dix-huit', 'Dix-neuf'],
        'tens_fr' => ['', 'Dix', 'Vingt', 'Trente', 'Quarante', 'Cinquante', 'Soixante', 'Soixante-dix', 'Quatre-vingts', 'Quatre-vingt-dix'],
        'thousands_fr' => ['', 'Mille', 'Million', 'Milliard', 'Billion'],
        'zero_fr' => 'Zéro',
        'negative_fr' => 'Négatif ',
        'hundred_fr' => ' Cent ',
        'and_fr' => ' et ',
        'cents_fr' => ' Centimes',

        // Spanish words
        'units_es' => ['', 'Uno', 'Dos', 'Tres', 'Cuatro', 'Cinco', 'Seis', 'Siete', 'Ocho', 'Nueve'],
        'teens_es' => ['Diez', 'Once', 'Doce', 'Trece', 'Catorce', 'Quince', 'Dieciséis', 'Diecisiete', 'Dieciocho', 'Diecinueve'],
        'tens_es' => ['', 'Diez', 'Veinte', 'Treinta', 'Cuarenta', 'Cincuenta', 'Sesenta', 'Setenta', 'Ochenta', 'Noventa'],
        'thousands_es' => ['', 'Mil', 'Millón', 'Mil Millones', 'Billón'],
        'zero_es' => 'Cero',
        'negative_es' => 'Negativo ',
        'hundred_es' => ' Cien ',
        'and_es' => ' y ',
        'cents_es' => ' Centavos',

        // German words
        'units_de' => ['', 'Eins', 'Zwei', 'Drei', 'Vier', 'Fünf', 'Sechs', 'Sieben', 'Acht', 'Neun'],
        'teens_de' => ['Zehn', 'Elf', 'Zwölf', 'Dreizehn', 'Vierzehn', 'Fünfzehn', 'Sechzehn', 'Siebzehn', 'Achtzehn', 'Neunzehn'],
        'tens_de' => ['', 'Zehn', 'Zwanzig', 'Dreißig', 'Vierzig', 'Fünfzig', 'Sechzig', 'Siebzig', 'Achtzig', 'Neunzig'],
        'thousands_de' => ['', 'Tausend', 'Million', 'Milliarde', 'Billion'],
        'zero_de' => 'Null',
        'negative_de' => 'Negativ ',
        'hundred_de' => ' Hundert ',
        'and_de' => ' und ',
        'cents_de' => ' Cent',

        // Italian words
        'units_it' => ['', 'Uno', 'Due', 'Tre', 'Quattro', 'Cinque', 'Sei', 'Sette', 'Otto', 'Nove'],
        'teens_it' => ['Dieci', 'Undici', 'Dodici', 'Tredici', 'Quattordici', 'Quindici', 'Sedici', 'Diciassette', 'Diciotto', 'Diciannove'],
        'tens_it' => ['', 'Dieci', 'Venti', 'Trenta', 'Quaranta', 'Cinquanta', 'Sessanta', 'Settanta', 'Ottanta', 'Novanta'],
        'thousands_it' => ['', 'Mille', 'Milione', 'Miliardo', 'Bilione'],
        'zero_it' => 'Zero',
        'negative_it' => 'Negativo ',
        'hundred_it' => ' Cento ',
        'and_it' => ' e ',
        'cents_it' => ' Centesimi',
    ]
];
```

Usage
-----

[](#usage)

```
use NumberToWord\NumberToWords\Traits\NumbersToWords;

$words = NumbersToWords::numbersToWords(12000, 'en');
echo $words; // Outputs: Twelve Thousand
```

```
use NumberToWord\NumberToWords\Traits\WordsToNumbers;

$numbers = WordsToNumbers::wordsToNumbers('Twelve Thousand', 'en');
echo $numbers; // Outputs: 12000
```

It's support filament,you can use it with filament as you see below.
--------------------------------------------------------------------

[](#its-support-filamentyou-can-use-it-with-filament-as-you-see-below)

```
// with form.
return $form
    ->schema([
        Section::make()
            ->schema([
                NumbersToWordsInput::make('price')
                    ->label('Numbers To Words')
                    ->lang('en'),
                WordsToNumbersInput::make('word')
                    ->label('Words To Numbers')
                    ->lang('en'),
```

```
// with table.
return $table
     ->columns([
		NumbersToWordsColumn::make('price')
			->label("Numbers To Words")
			->lang('en')
			->suffix(' DA')
			->badge()
			->color('success'),
                WordsToNumbersColumn::make('word')
			->label("Words To Numbers")
			->lang('en')
			->suffix(' DA')
			->badge()
			->color('primary'),
    ])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- \[Ibrahim Bougaoua\]( Bougaoua)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance57

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

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

731d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/42cb517e994883d2bfba50af94449dd4e4348c8423516e71c1bfa4738e083df9?d=identicon)[ibrahim.bougaoua](/maintainers/ibrahim.bougaoua)

---

Top Contributors

[![ibrahimBougaoua](https://avatars.githubusercontent.com/u/41789518?v=4)](https://github.com/ibrahimBougaoua "ibrahimBougaoua (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

filamentlaravellivewirephplaravelnumbertowordsIbrahim Bougaoua

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ibrahim-bougaoua-numbertowords/health.svg)

```
[![Health](https://phpackages.com/badges/ibrahim-bougaoua-numbertowords/health.svg)](https://phpackages.com/packages/ibrahim-bougaoua-numbertowords)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/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.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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