PHPackages                             rakibhstu/number-to-bangla - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. rakibhstu/number-to-bangla

ActiveLibrary[Localization &amp; i18n](/categories/localization)

rakibhstu/number-to-bangla
==========================

A Laravel package for converting English numbers into Bangla digits, Bangla words, Bangla month names, and Bangla money format with an easy-to-use API.

v2.0.0(5mo ago)8110.8k—7.1%36MITPHPPHP ^8.0|^8.1|^8.2|^8.3|^8.4

Since Jan 23Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/RakibDevs/number-to-bangla)[ Packagist](https://packagist.org/packages/rakibhstu/number-to-bangla)[ RSS](/packages/rakibhstu-number-to-bangla/feed)WikiDiscussions master Synced 2d ago

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

Number to Bangla Number, Word or Month Name in Laravel
======================================================

[](#number-to-bangla-number-word-or-month-name-in-laravel)

[![Packagist](https://camo.githubusercontent.com/b41f8b90739e02ff38bdfb194fe12e2b05e26dbb94112e3f5fc75dcabc99af84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616b6962687374752f6e756d6265722d746f2d62616e676c61)](https://packagist.org/packages/rakibhstu/number-to-bangla)[![GitHub stars](https://camo.githubusercontent.com/8f990604185ffa7014ae053b77d285e76f695556c9c032f87912ef1980834473/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f72616b6962646576732f6e756d6265722d746f2d62616e676c61)](https://github.com/rakibdevs/number-to-bangla/stargazers)[![GitHub forks](https://camo.githubusercontent.com/79c0e6980b085ad55fa8fb69dfe46936f73f499e8b94d90ae3c17ad1bf44a59e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f72616b6962646576732f6e756d6265722d746f2d62616e676c61)](https://github.com/rakibdevs/number-to-bangla/network)[![GitHub issues](https://camo.githubusercontent.com/6cd59b4a075172c2f4b6f5a648b3e3698cd8a78beeb0d1da4f54b31b9a086930/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f72616b6962646576732f6e756d6265722d746f2d62616e676c61)](https://github.com/rakibdevs/number-to-bangla/issues)[![GitHub license](https://camo.githubusercontent.com/691e2e0f579f70e26845aa86353eafc1c271f71713781a834ab67a1b901d557f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f72616b6962646576732f6e756d6265722d746f2d62616e676c61)](https://github.com/rakibdevs/number-to-bangla/blob/master/LICENSE)[![Tests](https://github.com/rakibdevs/number-to-bangla/workflows/Tests/badge.svg)](https://github.com/rakibdevs/number-to-bangla/actions)

Laravel package to convert English numbers to Bangla number or Bangla text, Bangla month name and Bangla Money Format for **Laravel 9.x, 10.x, 11.x, and 12.x**.

Maximum possible number to convert in Bangla word is **999999999999999**

[Get Wordpress Plugin](https://wordpress.org/plugins/number-to-bangla/)

Features
--------

[](#features)

OperationEnglish InputBangla OutputText (Integer)13459তেরো হাজার চার শত ঊনষাটText (Float)1345.05এক হাজার তিন শত পঁয়তাল্লিশ দশমিক শূন্য পাঁচNumber1345.5১৩৪৫.৫Text Money Format1345.50এক হাজার তিন শত পঁয়তাল্লিশ টাকা পঞ্চাশ পয়সাMonth12ডিসেম্বরComma (Lakh)121212121১২,১২,১২,১২১Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 9.x, 10.x, 11.x, or 12.x

Complete Usage Guide - NumberToBangla v2.0
==========================================

[](#complete-usage-guide---numbertobangla-v20)

🚀 Installation
--------------

[](#-installation)

```
composer require rakibhstu/number-to-bangla:^2.0
```

📖 Table of Contents
-------------------

[](#-table-of-contents)

1. [Basic Number Conversion](#basic-number-conversion)
2. [Date &amp; Time](#date--time)
3. [Advanced Features](#advanced-features)
4. [Reverse Parsing](#reverse-parsing)
5. [Fluent API](#fluent-api)

---

Basic Number Conversion
-----------------------

[](#basic-number-conversion)

### Number to Bangla Digits

[](#number-to-bangla-digits)

```
use Rakibhstu\Banglanumber\NumberToBangla;

$numto = new NumberToBangla();

echo $numto->bnNum(12345);
// Output: ১২৩৪৫

echo $numto->bnNum(1234.56);
// Output: ১২৩৪.৫৬
```

### Number to Bangla Words

[](#number-to-bangla-words)

```
echo $numto->bnWord(12345);
// Output: বারো হাজার তিন শত পঁয়তাল্লিশ

echo $numto->bnWord(1345.05);
// Output: এক হাজার তিন শত পঁয়তাল্লিশ দশমিক শূন্য পাঁচ
```

### Comma Separated (Lakh Format)

[](#comma-separated-lakh-format)

```
echo $numto->bnCommaLakh(1234567);
// Output: ১২,৩৪,৫৬৭
```

### Percentage

[](#percentage)

```
echo $numto->bnPercentage(75.5);
// Output: ৭৫.৫%

echo $numto->bnPercentage(75.5, asWord: true);
// Output: পঁচাত্তর দশমিক পাঁচ শতাংশ
```

---

Currency Formatting
-------------------

[](#currency-formatting)

### Money Format (Taka/Paisa)

[](#money-format-takapaisa)

```
echo $numto->bnMoney(5000);
// Output: পাঁচ হাজার টাকা

echo $numto->bnMoney(5000.50);
// Output: পাঁচ হাজার টাকা পঞ্চাশ পয়সা
```

---

Date &amp; Time
---------------

[](#date--time)

### Month Names

[](#month-names)

```
echo $numto->bnMonth(1);
// Output: জানুয়ারি

echo $numto->bnMonth(12);
// Output: ডিসেম্বর
```

### Day Names

[](#day-names)

```
echo $numto->bnDay(1);
// Output: রবিবার

echo $numto->bnDay('monday');
// Output: সোমবার
```

### Time Formatting

[](#time-formatting)

```
echo $numto->bnTime('14:30');
// Output: দুপুর ২:৩০

echo $numto->bnTime('14:30', asWord: true);
// Output: দুপুর দুইটা ত্রিশ মিনিট

echo $numto->bnTime('09:15', asWord: true);
// Output: সকাল নয়টা পনেরো মিনিট
```

### Duration

[](#duration)

```
echo $numto->bnDuration(3665);
// Output: ১ ঘন্টা ১ মিনিট ৫ সেকেন্ড

echo $numto->bnDuration(90);
// Output: ১ মিনিট ৩০ সেকেন্ড
```

### Bengali Calendar

[](#bengali-calendar)

```
echo $numto->bnBengaliMonth(1);
// Output: বৈশাখ

echo $numto->bnSeason(1);
// Output: গ্রীষ্ম

echo $numto->bnSeason(5);
// Output: শীত
```

### Age Calculator

[](#age-calculator)

```
echo $numto->bnAge('1990-01-15');
// Output: ৩৫ বছর

echo $numto->bnAge('1990-01-15', detailed: true);
// Output: ৩৫ বছর ২ মাস ৫ দিন
```

### Date Formatting

[](#date-formatting)

```
echo $numto->bnDate('2024-01-15');
// Output: ১৫ জানুয়ারি, ২০২৪

---
## Reverse Parsing

### Parse Bangla Numbers to English
```php
$number = $numto->parseNum('১২৩৪৫');
// Output: 12345

$number = $numto->parseNum('১২,৩৪,৫৬৭');
// Output: 1234567
```

Fluent API
----------

[](#fluent-api)

### Beautiful Chaining

[](#beautiful-chaining)

```
$result = $numto->number(12345)
                ->toBangla()
                ->asWord()
                ->withPrefix('মোট: ')
                ->withSuffix(' টাকা')
                ->get();
// Output: মোট: বারো হাজার তিন শত পঁয়তাল্লিশ টাকা
```

### Different Formats

[](#different-formats)

```
// As percentage
$result = $numto->number(75.5)
                ->asPercentage(asWord: true)
                ->get();
// Output: পঁচাত্তর দশমিক পাঁচ শতাংশ
```

Batch Processing
----------------

[](#batch-processing)

### Convert Multiple Numbers

[](#convert-multiple-numbers)

```
$numbers = [100, 200, 300];
$result = $numto->batch($numbers, 'bnNum');
// Output: ['১০০', '২০০', '৩০০']

$result = $numto->batch($numbers, 'bnWord');
// Output: ['এক শত', 'দুই শত', 'তিন শত']
```

### With Associative Arrays

[](#with-associative-arrays)

```
$data = [
    'revenue' => 500000,
    'expenses' => 200000,
    'profit' => 300000
];

$result = $numto->batchWithKeys($data, 'bnCurrency');
// Output: [
//   'revenue' => '৫ লক্ষ টাকা',
//   'expenses' => '২ লক্ষ টাকা',
//   'profit' => '৩ লক্ষ টাকা'
// ]
```

---

API Integration
---------------

[](#api-integration)

### Convert to Array

[](#convert-to-array)

```
$result = $numto->toArray(12345);
/* Output:
[
    'original' => 12345,
    'bangla_number' => '১২৩৪৫',
    'bangla_word' => 'বারো হাজার তিন শত পঁয়তাল্লিশ',
    'money_format' => 'বারো হাজার তিন শত পঁয়তাল্লিশ টাকা',
    'comma_format' => '১২,৩৪৫'
]
*/
```

### Convert to JSON

[](#convert-to-json)

```
$json = $numto->toJson(12345);
// Returns UTF-8 encoded JSON string
```

### In API Controllers

[](#in-api-controllers)

```
public function show($id)
{
    $product = Product::find($id);

    return response()->json([
        'name' => $product->name,
        'price' => NumberToBangla::convert($product->price),
        'price_words' => NumberToBangla::words($product->price),
        'discount' => [
            'rate' => app(NumberToBangla::class)->bnPercentage($product->discount),
            'amount' => NumberToBangla::money($product->discount_amount)
        ],
        'details' => app(NumberToBangla::class)->toArray($product->price)
    ]);
}
```

---

Static Helpers
--------------

[](#static-helpers)

### Quick One-Liners

[](#quick-one-liners)

```
use Rakibhstu\Banglanumber\NumberToBangla;

// In controllers
$banglaNumber = NumberToBangla::convert(12345);

// In Blade
{{ NumberToBangla::words($amount) }}
{{ NumberToBangla::money($total) }}

// In models
public function getPriceAttribute($value)
{
    return NumberToBangla::convert($value);
}
```

Real-World Use Cases
--------------------

[](#real-world-use-cases)

### E-Commerce

[](#e-commerce)

```
$discount = $numto->bnPercentage(20);
$final = $numto->bnMoney(20000);

// Stock display
$stock = $numto->bnWord(50) . ' পিস';
```

### Education

[](#education)

```
$marks = $numto->bnNum(85);
$percentage = $numto->bnPercentage(85);
```

### Official

[](#official)

```
// Official documents
$amount = $numto->bnMoney(50000);
$date = $numto->bnDate('2024-01-15');
$age = $numto->bnAge('1990-01-01');
```

---

Performance Tips
----------------

[](#performance-tips)

1. **Batch Processing**: Use `batch()` for multiple conversions
2. **Static Helpers**: Use for simple, one-off conversions
3. **Fluent API**: Chain multiple operations efficiently

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

[](#security)

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

Credits
-------

[](#credits)

- [Rakibul Islam](https://github.com/rakibdevs)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Support
-------

[](#support)

If you find this package helpful, please consider giving it a ⭐ on [GitHub](https://github.com/rakibdevs/number-to-bangla)!

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance70

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% 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 ~302 days

Recently: every ~422 days

Total

7

Last Release

173d ago

Major Versions

v1.5.0 → v2.0.02026-01-12

PHP version history (3 changes)v1.0PHP ^7.1.3

v1.3PHP ^7.1|^7.2|^7.3|^7.4|^8.0

v2.0.0PHP ^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d789cf937c914cb8a2ce0c513840be4c4558007bb36433509496587d1989fdb?d=identicon)[rakibdevs](/maintainers/rakibdevs)

---

Top Contributors

[![rakibdevs](https://avatars.githubusercontent.com/u/44586913?v=4)](https://github.com/rakibdevs "rakibdevs (74 commits)")[![arif98741](https://avatars.githubusercontent.com/u/17213478?v=4)](https://github.com/arif98741 "arif98741 (1 commits)")[![smartdatasoft](https://avatars.githubusercontent.com/u/941400?v=4)](https://github.com/smartdatasoft "smartdatasoft (1 commits)")

---

Tags

banglalarave-packagelaravelnumber-to-banglanumber-to-bangla-wordnumber-to-month-name-banglanumber-to-wordphplaravellaravel-packageBanglanumber to wordbengalibangla-numbernumber-to-banglabangla-moneybangla-month-name

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rakibhstu-number-to-bangla/health.svg)

```
[![Health](https://phpackages.com/badges/rakibhstu-number-to-bangla/health.svg)](https://phpackages.com/packages/rakibhstu-number-to-bangla)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M307](/packages/laravel-horizon)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

29420.2k3](/packages/sebastienheyd-boilerplate)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

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