A Go SDK for decoding Vehicle Identification Numbers (VINs).
- Standards Compliant: ISO 3779 and SAE J1044 parsing logic.
- OEM-specific Decoding: Parsers for European commercial vehicles
- Data Enrichment: Integrated datasets from NHTSA vPIC, German KBA, and open sources.
- Validation: Check digit verification (North America) and structural analysis.
- Structured Output: Strictly typed Protobuf / JSON data model.
go get github.com/way-platform/vin-gogo install github.com/way-platform/vin-go/cmd/vin@latestpackage main
import (
"fmt"
"log"
"github.com/way-platform/vin-go"
)
func main() {
v := "W1T98300010712345"
decoded, err := vin.Decode(v)
if err != nil {
log.Fatalf("Error: %v", err)
}
fmt.Printf("Region: %s\n", decoded.GetRegion())
fmt.Printf("Manufacturer: %s\n", decoded.GetManufacturer().GetDisplayName())
fmt.Printf("Brand: %s\n", decoded.GetVehicle().GetBrand())
fmt.Printf("Model: %s\n", decoded.GetVehicle().GetModel())
}vin decode W1T98300010712345Output (JSON):
{
"value": "W1T98300010712345",
"wmi": "W1T",
"vds": "983000",
"vis": "10712345",
"year": 2001,
"region": "EUROPE",
"country": "GERMANY",
"calculatedCheckDigit": "0",
"checkDigitValid": true,
"manufacturer": {
"kbaId": 7070,
"country": "GERMANY",
"brands": ["MERCEDES_BENZ"],
"dataSources": ["KBA", "WIKIBOOKS"]
},
"vehicle": {
"brand": "MERCEDES_BENZ",
"type": "HEAVY_GOODS_VEHICLE",
"model": "E_ACTROS",
"fuelTypes": ["ELECTRIC"],
"dataSources": ["DEEP_RESEARCH"]
}
}This SDK combines data from various sources to provide comprehensive VIN decoding. The following diagram illustrates the primary data flows:
graph BT
%% Root Node
Root["vin.Decode"]
%% Data Sources Level
KBA["KBA"]
vPIC["vPIC"]
Wikibooks["Wikibooks"]
Wikipedia["Wikipedia"]
DeepResearch["Deep Research"]
%% Source Details Level
KBAPDF["π PDF Document"]
vPICDB[("MS SQL Database")]
%% Connect Sub-sources to Sources
KBAPDF --> KBA
vPICDB --> vPIC
%% Connect Sources to Root
KBA --> Root
vPIC --> Root
Wikibooks --> Root
Wikipedia --> Root
DeepResearch --> Root
- NHTSA vPIC: US market manufacturer database.
- KBA (Kraftfahrt-Bundesamt): German Federal Motor Transport Authority database.
- Deep Research: Manual analysis of OEM body builder guides and homologation documents.
- Wikipedia: Wikipedia page on VINs.
- Wikibooks: Wikibooks book on VINs.
- Go 1.24+
./tools/mage buildMIT License - see LICENSE for details.