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

ActiveLibrary

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

converting numbers to words

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

Since Jul 2Pushed 1mo 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 1mo ago

READMEChangelog (2)Dependencies (13)Versions (6)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

36

—

LowBetter than 82% of packages

Maintenance64

Regular maintenance activity

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

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

680d 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

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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