Arabic formatting: 22 Arab currencies (Saudi riyal U+20C1), Hijri dates, تفقيط, RTL/bidi fixes.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Currency symbols · Hijri/Islamic calendar · number-to-words · تفقيط · 6 plural forms · RTL/bidi —
correct for all 22 Arab League countries, with zero dependencies and full TypeScript types.
أرقامٌ وعملاتٌ وتواريخُ هجريةٌ ولغةٌ عربيةٌ سليمة — في سطرٍ واحد.
arabicfmt is the only JavaScript library that handles the entire Arabic formatting stack in one zero-dependency package — currency symbols, number precision, Hijri/Islamic calendar dates, RTL bidirectional text, Arabic number-to-words and تفقيط — with full TypeScript types. Works in Node, the browser, Deno, Bun and React Native.
| Problem | Other libraries | arabicfmt |
|---|---|---|
| Saudi riyal U+20C1 | Emits ﷼ (U+FDFC) — the Iranian rial | Correct U+20C1 with a safe text fallback |
| Iraqi dinar (IQD) decimals | 0 (CLDR practical) | 3 decimals — ISO 4217 legal standard |
| Hijri date output | Varies between Node, Chrome, Safari, Hermes | Frozen Umm al-Qura tables — identical on every engine |
| Arabic plurals | 1–2 forms; Arabic legally needs 6 | Full CLDR 6-form system (zero/one/two/few/many/other) |
| Number to Arabic words | No zero-dep solution | arabicToWords(1234) → "ألف ومئتان وأربعة وثلاثون" |
| Spell money for cheques (تفقيط) | Build it yourself, get the grammar wrong | spellCurrency(1234.5, {currency:"SAR"}) → "ألف ومئتان وأربعة وثلاثون ريالاً وخمسون هللةً" |
| Ordinals (ترتيبية) | Missing or gender-blind | arabicOrdinal(25) → "الخامس والعشرون", gender-aware |
| Spoken durations | Intl.DurationFormat barely supported | formatDuration(7_500_000) → "ساعتان وخمس دقائق" with full agreement |
| RTL broken sentences | Phone numbers flip mid-sentence | Unicode isolates wrap LTR runs automatically |
| Eastern Arabic digit parsing | parseInt("١٢٣") → NaN | parseNumber("١٬٢٣٤٫٥٦") → 1234.56 |
| Arabic URL slugs | Strip to empty or mojibake | slugify("مدينة جدة") → "mdynh-jdh" |
| IBAN / Saudi ID checks | Regex that accepts bad numbers | Real ISO 7064 mod-97 + Luhn checksums |
Requirements: Node.js ≥ 18 · TypeScript ≥ 4.7 (optional) · zero runtime dependencies.
Every release is mirrored on the jsDelivr and unpkg CDNs automatically. Import the browser-ready ESM bundle straight from a URL — no install, no bundler:
Subpaths work too — e.g. https://cdn.jsdelivr.net/npm/arabicfmt/dist/currency/index.js for just the currency module. Pin a version for production, e.g. arabicfmt@0.1.
symbolModeThe Saudi riyal received its own Unicode symbol (U+20C1) in September 2025. Most libraries either emit the wrong ligature (U+FDFC, the Iranian rial) or fall back to SAR. arabicfmt gives you full control:
symbolMode | SAR | AED | OMR | Use when |
|---|---|---|---|---|
auto (default) | ر.س | U+20C3 | U+20C4 | Default. AED/OMR use the dedicated sign; SAR stays on safe text |
new | U+20C1 | U+20C3 | U+20C4 | Force the dedicated sign (needs font support) |
text | ر.س | د.إ | ر.ع. | Always the safe text symbol — renders everywhere |
code | SAR | AED | OMR | ISO code |
Unicode 18.0 (September 2026): the AED (U+20C3) and OMR (U+20C4) signs are now
live, andautoprefers them. Need maximum compatibility today? UsesymbolMode: "text". The Saudi riyal keeps its safe text default by design.
Generated from CLDR 48.2.0 at build time and verified on every build:
| Decimals | Currencies |
|---|---|
| 3 | KWD, BHD, OMR, JOD, IQD, LYD, TND |
| 0 | DJF, KMF |
| 2 | SAR, AED, QAR, and the rest |
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/arabicfmt-mcp)<a href="https://allmcps.com/mcp/arabicfmt-mcp"><img src="https://allmcps.com/api/badge/arabicfmt-mcp?style=directory" alt="Arabicfmt MCP on AllMCPs" /></a>