A developer-friendly, up-to-date JSON master list of all Indian GST HSN (Goods) and SAC (Services) codes.
This repository is designed for developers building billing interfaces, ERPs, and accounting SaaS for MSMEs. It provides a lightweight, unified JSON structure perfect for powering fast frontend typeahead search dropdowns without relying on paid or rate-limited third-party APIs.
Official HSN/SAC master data is provided by the government in Excel format, which isn't immediately usable in modern web applications. Older GitHub repositories containing this data are often years out of date. This repo provides the converted JSON and the open-source Python script used to generate it, ensuring the community can easily keep it updated.
├── data/
│ ├── master_hsn_sac.json # Combined HSN & SAC codes (recommended for most use cases)
│ ├── hsn.json # HSN codes only (goods)
│ └── sac.json # SAC codes only (services)
├── raw/
│ └── HSN_SAC.xlsx # Original Excel source file
└── scripts/
└── convert_to_json.py # Python conversion script
Future additions planned:
state-codes.json- Indian state codes and GST registration patternstax-rates.json- Current GST tax rates by HSN/SAC codesexemptions.json- Tax exemption categories
🏗️ Data Structure
All JSON files follow a consistent, flattened structure for easy frontend integration:
[
{
"code": "0101",
"desc": "Live horses, asses, mules and hinnies",
"type": "goods"
},
{
"code": "995411",
"desc": "Construction services of single dwelling buildings",
"type": "services"
}
]- Total codes: Combined HSN + SAC entries
- HSN codes: Goods classification codes
- SAC codes: Services classification codes
- Last updated: Check commit history for latest data updates
- Fork the repository
- Update the Excel source file in
raw/with latest government data - Run
cd scripts && python convert_to_json.pyto regenerate JSON files - Submit a pull request with your changes
MIT License - feel free to use in commercial and open-source projects.