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.
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
- 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.
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.
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-bdCopy-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:
- 1Fork the repository on GitHub
- 2Clone your fork locally
- 3Create a new feature branch (
git checkout -b feature/amazing-feature) - 4Commit your changes (
git commit -m 'Improve formatting') - 5Push to your branch (
git push origin feature/amazing-feature) - 6Open a Pull Request with details
License
This project is free and open-source software licensed under the MIT License.
Copyright Š 2026 Noor Mohammad
If this package saves you time, consider buying me a coffee.
Your support helps keep the utilities updated and well-documented. đ
đ Thank you for your support!