Playground
The TypeScript library, running in your browser. Nothing you type is uploaded. Each tool shows the code for what you've entered.
Identity
CNIC validator and infoValidate Pakistani CNIC numbers and read the province and gender they encode.
Passport and vehicle platesCheck the shape of a Pakistani passport number, and split a vehicle registration plate into series, number and year.
Form inputsFields that format as you type and only show an error when the value can no longer become valid. Built with the pakdatakit-react components.
Phone and messaging
Phone analyserValidate Pakistani mobile numbers, format to E.164, and detect the issuing network.
Landlines and UAN numbersIdentify mobile, landline, UAN, toll-free, premium-rate and personal numbers, with area code and city.
WhatsApp linksGenerate wa.me click-to-chat links for Pakistani mobile numbers.
Geography
Cities and districtsLook up provinces, search cities and districts, or list districts by province.
Postal codesLook up postal codes by city, find cities by code, or search postal entries.
Post offices and tehsilsEvery delivery post office in Pakistan Post's directory (about 2,560, including villages), and the tehsils of each district from the 2023 census.
Address parserParse free-form Pakistani addresses into structured components and format them back.
COD checksSpot cash-on-delivery orders a rider will struggle to deliver: score how complete an address is, and flag phone numbers a courier cannot use.
Courier cities (experimental)Match the short forms, old names and Urdu spellings customers type to the city list, and map a courier's own status to one vocabulary. No courier API is called.
Finance
Currency and amounts in wordsFormat Pakistani Rupee amounts with lakh/crore conventions and write them in words for cheques, in English and Urdu.
IBAN validatorValidate Pakistani IBANs with the mod-97 checksum and see which bank issued them, what kind of bank it is and whether it still exists.
Raast QR codesCreate Raast payment QR codes, and check any Pakistani payment QR for tampering, expiry or a bad IBAN before paying.
Electricity and gas billsCheck and format electricity bill references (DISCO reference numbers and customer IDs, K-Electric accounts) and SNGPL or SSGC gas consumer numbers.
Tax and FBR
NTN and STRNCheck the format of FBR National Tax Numbers and Sales Tax Registration Numbers.
Sales taxTry sales tax in your browser: the rate for goods (FBR) or services in each province on any date since July 2019, and the tax on an amount.
Income tax on salaryIncome tax on salary from the salaried rate table of the Income Tax Ordinance 2001, for tax years 2020 to 2027, computed exactly in whole paisa.
FBR invoice validatorCheck an FBR Digital Invoicing invoice offline against PRAL's DI API specification v1.12, with FBR's own error codes. Nothing is sent to FBR.
Locale
Text utilitiesNormalize text, Roman Urdu spellings, and convert between English and Urdu digits.
Urdu slugsURL slugs that keep Urdu letters instead of dropping them, with the option to keep only Latin or only Urdu words.
Hijri calendarConvert Gregorian dates to Hijri, format Islamic dates, and check for Ramadan.
Public holidaysPakistan's federal public holidays, using the Eid, Ashura and Milad dates actually observed after moon sighting.
Tools
Mock data (faker)Realistic Pakistani test data that fits together: the CNIC matches the province and gender, and the city, postal code, area code and bank agree.