I Built a Free VIN Decoder That Uses the NHTSA API - Here is How
Source: Dev.to
Overview
Every car has a 17‑digit VIN (Vehicle Identification Number) that encodes its full identity—year, make, model, engine, safety features, and manufacturing plant. Most VIN‑decoder sites charge money or require an account, so I built a free alternative.
The NHTSA API
The National Highway Traffic Safety Administration provides a public, no‑key API that decodes any VIN:
https://vpic.nhtsa.dot.gov/api/vehicles/decodevinvalues/{VIN}?format=json
- No API key required.
- No strict rate limiting (within reasonable use).
- Returns over 100 fields per VIN, including make, model, year, engine specs, safety features, and plant location.
Useful Fields Returned
| Field | Description |
|---|---|
| Make / Model / Year | Basic vehicle identification |
| BodyClass | Body style (Sedan, SUV, truck, etc.) |
| DriveType | FWD, RWD, AWD, 4WD |
| FuelTypePrimary | Gasoline, diesel, electric |
| EngineCylinders / DisplacementL | Engine specifications |
| AirBagLocFront / Side / Curtain | Airbag locations (safety features) |
| PlantCountry / PlantCity | Manufacturing location |
Why It Matters
- Used‑car purchases – Verify trim levels, engine options, and other specs that sellers might misrepresent.
- Automotive applications – Build inventory systems, dealer tools, or marketplaces without maintaining your own vehicle database.
Implementation
The web tool simply performs a fetch request to the NHTSA endpoint and cleans up the response fields for display. All VIN parsing logic (including world manufacturer identifiers, check digits, and model‑year encoding) is handled by the API.
Limitations
- Vehicles built before 1981 often have VINs shorter than 17 characters, so the database may lack data for those older models.
- Some foreign‑market vehicles may have incomplete entries.
- For any vehicle sold in the U.S. after 1981, the API is generally comprehensive and remains free.
Availability
The decoder is available as a free web tool at simplylouie.com/vin-decoder. No signup or email capture is required—just paste a VIN and view the results.