PHPackages                             jayen/number-converter - 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. jayen/number-converter

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

jayen/number-converter
======================

Laravel package to convert numbers written in words into integers.

2.0.0(10mo ago)15MITPHPPHP &gt;=8.1

Since Aug 19Pushed 2mo agoCompare

[ Source](https://github.com/JayenKB/number-converter)[ Packagist](https://packagist.org/packages/jayen/number-converter)[ Docs](https://github.com/jayenbambharoliya/number-converter)[ RSS](/packages/jayen-number-converter/feed)WikiDiscussions main Synced today

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

Number Converter for Laravel
============================

[](#number-converter-for-laravel)

A Laravel package to convert **numbers written in words** into **numeric values**, and vice versa.

✨ Features
----------

[](#-features)

- Convert `"two hundred million"` → `200000000`
- Convert `"Three Hundred Thousand"` → `300000`
- Convert `200000000` → `"two hundred million"`
- Convert `300000` → `"Three Hundred Thousand"`
- Format `1234567.89` → `₹12,34,567.89`
- Format `1234567.89` with currency code `"USD"` → `$1,234,567.89`
- Convert `12345678.89` with currency code `"INR"` → `"one crore, twenty-three lakh, forty-five thousand, six hundred and seventy-eight rupees and eighty-nine paise"`

---

📦 Installation
--------------

[](#-installation)

Install via [Packagist](https://packagist.org/packages/jayen/number-converter) using Composer:

```
composer require jayen/number-converter
```

---

🚀 Usage
-------

[](#-usage)

### Using the Facade

[](#using-the-facade)

```
use Jayen\NumberConverter\Facades\NumberConverter;

$number = NumberConverter::wordsToNumber("One Thousand Two Hundred Thirty Four");
// Output: 1234

$words = NumberConverter::numberToWords("1234");
// Output: one thousand, two hundred and thirty-four

$currency = NumberConverter::formatCurrency(1234567.89, 'USD');
// Output: $1,234,567.89

$withoutSymbol = NumberConverter::formatCurrency(1234567.89, 'INR', false);
// Output: INR 12,34,567.89

$currencyWords = NumberConverter::numberToCurrencyWords(12345678.89, 'INR');
// Output: one crore, twenty-three lakh, forty-five thousand, six hundred and seventy-eight rupees and eighty-nine paise

$usdWords = NumberConverter::numberToCurrencyWords(1234567.89, 'USD');
// Output: one million, two hundred and thirty-four thousand, five hundred and sixty-seven dollars and eighty-nine cents
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Jayen\NumberConverter\NumberConverter;

public function convert(NumberConverter $converter)
{
    $number = $converter->wordsToNumber("Five Million Six Hundred");
    // Output: 5600000

    $words = $converter->numberToWords("5600000");
    // Output: Five Million Six Hundred

    $number = $converter->wordsToNumber("Twelve Lakh Thirty Four Thousand Five Hundred Sixty Seven");
    // Output: 1234567

    $amount = $converter->formatCurrency(1234567.89, 'INR');
    // Output: ₹12,34,567.89

    $amountWords = $converter->numberToCurrencyWords(1234567.89, 'USD');
    // Output: one million, two hundred and thirty-four thousand, five hundred and sixty-seven dollars and eighty-nine cents
}
```

### Currency Codes

[](#currency-codes)

```
NumberConverter::formatCurrency(1234567.89, 'INR'); // ₹12,34,567.89
NumberConverter::formatCurrency(1234567.89, 'USD'); // $1,234,567.89
NumberConverter::formatCurrency(1234567.89, 'EUR'); // €1,234,567.89
NumberConverter::formatCurrency(1234567.89, 'GBP'); // £1,234,567.89
NumberConverter::formatCurrency(1234567.89, 'JPY'); // ¥1,234,568
```

### Currency Words

[](#currency-words)

```
NumberConverter::numberToCurrencyWords(12345678.89, 'INR');
// one crore, twenty-three lakh, forty-five thousand, six hundred and seventy-eight rupees and eighty-nine paise

NumberConverter::numberToCurrencyWords(1234567.89, 'USD');
// one million, two hundred and thirty-four thousand, five hundred and sixty-seven dollars and eighty-nine cents

NumberConverter::numberToCurrencyWords(1234567.89, 'JPY');
// one million, two hundred and thirty-four thousand, five hundred and sixty-eight yen
```

Supported currency codes: `INR`, `USD`, `EUR`, `GBP`, `JPY`, `AUD`, `CAD`, `CNY`, `AED`.

---

📜 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance72

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Every ~0 days

Total

3

Last Release

320d ago

Major Versions

1.1.0 → 2.0.02025-08-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0e11de7ca6ac908cf8cfc55ab194987e7e07ee523c2e2539edaf93a2947fe70?d=identicon)[jayen\_bambhroliya](/maintainers/jayen_bambhroliya)

---

Top Contributors

[![JayenKB](https://avatars.githubusercontent.com/u/40331336?v=4)](https://github.com/JayenKB "JayenKB (15 commits)")

### Embed Badge

![Health badge](/badges/jayen-number-converter/health.svg)

```
[![Health](https://phpackages.com/badges/jayen-number-converter/health.svg)](https://phpackages.com/packages/jayen-number-converter)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M377](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M137](/packages/illuminate-cookie)

PHPackages © 2026

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