Currency Formatter BD

🇧🇩 TypeScript utility for Bangladeshi Taka formatting

Format numbers with the official 3-2-2 comma grouping, convert numbers to words (Bangla + English), and generate currency strings consistently.

VersionLicenseDownloadsSize
🇧🇩

Made for Bangladesh

Local-first financial formatting for apps, dashboards, and invoices.

  • Official 3-2-2 comma grouping
  • Number-to-words in Bangla & English
  • Type-safe and lightweight

Visit reactbd.com

🇧🇩 Comma Formatting

Formats numbers using the South Asian/Bangladeshi numbering system (e.g., 1,23,45,678).

🔤 Number to Words

EnglishOne Hundred Taka
BanglaāĻāĻ• āĻļāϤ āϟāĻžāĻ•āĻž
  • Supports very large numbers (Trillions, Kotis)

ā§ŗ Currency Formatting

Customizable currency strings: symbols (ā§ŗ, Tk), positioning, spacing, and decimals.

🚀 Modern Stack

Built with TypeScript, zero dependencies, and supports both ESM and CJS.

Installation

Add the package using your preferred package manager.

  • Great for finance apps, invoices, and dashboards.
  • Works with both numbers and huge numeric strings.
  • Zero dependencies keeps installs fast.
Install Command

NPM, Yarn, PNPM, or Bun — your choice.

npm install currency-formatter-bd

# or

yarn add currency-formatter-bd

# or

pnpm add currency-formatter-bd

# or

bun add currency-formatter-bd
Usage Examples

Copy-paste friendly snippets for common tasks.

1Bangladeshi Comma Formatting

Properly places commas using the local 3-2-2 grouping.

import { formatWithCommas } from 'currency-formatter-bd';

console.log(formatWithCommas(12345678));
// Output: "1,23,45,678"

console.log(formatWithCommas('100000000050'));
// Output: "1,00,00,00,00,050" (Handles huge strings!)

2Number to Words

Convert amounts to human-readable words in English or Bangla.

English (International)

import { toWords } from 'currency-formatter-bd';

console.log(toWords(1050));
// Output: "One Thousand Fifty"

console.log(toWords('1098989389384384398434834893'));
// Output: "One Octillion ..."

Bangla (Local)

import { toWordsBangla } from 'currency-formatter-bd';

console.log(toWordsBangla(150));
// Output: "āĻāĻ• āĻļāϤ āĻĒāĻžā§āϚāĻžāĻļ"

console.log(toWordsBangla(1234567));
// Output: "āĻŦāĻžāϰ⧋ āϞāĻ•ā§āώ āϚ⧌āĻ¤ā§āϰāĻŋāĻļ āĻšāĻžāϜāĻžāϰ āĻĒāĻžāρāϚ āĻļāϤ āϏāĻžāϤāώāĻŸā§āϟāĻŋ"

console.log(toWordsBangla('1000000000'));
// Output: "āĻāĻ• āĻļāϤ āϕ⧋āϟāĻŋ"

console.log(toWordsBangla('100000000000000'));
// Output: "āĻāĻ• āϕ⧋āϟāĻŋ āϕ⧋āϟāĻŋ"

3Currency Formatting

Format prices with symbol, position, spacing, and decimals.

import { formatCurrency } from 'currency-formatter-bd';

// Default
console.log(formatCurrency(1500));
// Output: "ā§ŗ 1,500.00"

// Custom Symbol & Position
console.log(formatCurrency(5000, { symbol: 'Tk', position: 'right', spaced: true }));
// Output: "5,000.00 Tk"

// No Decimals
console.log(formatCurrency(199.99, { decimals: 0 }));
// Output: "ā§ŗ 200"

Contribution

We welcome contributions! Improve docs, add examples, or extend formatting utilities.

Follow these steps to contribute:

  1. 1Fork the repository on GitHub
  2. 2Clone your fork locally
  3. 3Create a new feature branch (git checkout -b feature/amazing-feature)
  4. 4Commit your changes (git commit -m 'Improve formatting')
  5. 5Push to your branch (git push origin feature/amazing-feature)
  6. 6Open a Pull Request with details

License

MIT License

This project is free and open-source software licensed under the MIT License.

Copyright Š 2026 Noor Mohammad

☕Support the Project

If this package saves you time, consider buying me a coffee.

Your support helps keep the utilities updated and well-documented. 🙏

Zero dependenciesâ€ĸType-safeâ€ĸActive maintenance
Buy me a coffeeBuy me a coffee

💝 Thank you for your support!