Welcome to Persian Tools
Persian Tools is a comprehensive, library-agnostic TypeScript toolkit designed specifically for Persian (Farsi) language applications. It provides 27+ utilities for text processing, number conversion, validation, and locale-specific operations.Quick Start
Get up and running in minutes
Number Conversion
Convert between Persian words and numbers
Validation
Validate Iranian IDs, cards, and more
Text Processing
Process and validate Persian text
Why Persian Tools?
🚀 High Performance
🚀 High Performance
Optimized algorithms with zero dependencies. Works seamlessly in Node.js, Bun, and browsers.
📦 Tree-Shakable
📦 Tree-Shakable
Import only what you need. Modern bundlers automatically eliminate unused code.
🔒 Type-Safe
🔒 Type-Safe
Written in TypeScript with strict typing. Get autocomplete and type checking out of the box.
✅ Battle-Tested
✅ Battle-Tested
Over 80% test coverage with comprehensive edge case handling.
Features Overview
🔢 Numbers & Text
- Number Conversion: Persian words ↔ numbers with fuzzy matching
- Digit Conversion: Persian ↔ Arabic ↔ English digits
- Comma Formatting: Add/remove thousands separators
- Ordinal Numbers: Convert to/from ordinal forms (اول، دوم، سوم)
🏛️ Validation & Verification
- National ID: Validate & generate Iranian national codes (کد ملی)
- Legal ID: Validate Iranian legal entity IDs (شناسه حقوقی)
- Phone Numbers: Validate & extract operator information
- Bank Cards: Validate & identify bank names
- IBAN/Sheba: Validate Iranian bank account numbers
🌍 Geographic & Location
- Place Lookup: Find city/province by national ID
- Capital Cities: Get province capitals
- Coordinates: Find province from GPS coordinates
- Vehicle Plates: Parse Iranian license plates
💰 Financial & Utilities
- Bill Calculator: Parse Iranian utility bills
- Bank Detection: Identify banks from card numbers
- IBAN Tools: Complete Iranian banking support
📝 Text Processing
- Persian Validation: Detect pure Persian text
- Character Cleanup: Remove Arabic characters from Persian
- URL Fixing: Decode Persian URLs
- Half-Space: Fix Persian typography
- Time Utilities: Persian time-ago & remaining time
- Slugify: Generate URL-safe slugs from Persian text
- Text Analysis: Comprehensive Persian text analysis
Community & Support
Who’s Using Persian Tools?
Persian Tools is trusted by leading organizations including banks, fintech companies, and startups across Iran and beyond.See Who's Using Persian Tools
Discover the companies and projects building amazing applications with Persian Tools, including Bank Maskan,
Maani, Melkba, and more.
