geekskai Logogeekskai
ToolsBlogPricing
Sign in
Sign in
ToolsBlogSign in
Wednesday, January 15, 2025|6.74Mins Read

Random VIN Generator by Year and Brand: Test Data and Check Digits

Authors
  • avatar
    Name
    Geeks Kai
    Twitter
    @KaiGeeks
Discuss on Twitter • View on GitHub

Tags

VIN-generatorvehicle-identification-numberautomotive-testingISO-3779VIN-by-yearVIN-by-brandautomotive-developmenttesting-toolsVIN-validationautomotive-software

Previous Article

Beyond the Books: How Smart Students Are Redefining Homework in 2025

Next Article

Why Video Presentations Are Your Marketing Cheat Code (And How to Actually Use Them)
← Back to the blog
geekskai Logo
geekskai

Public tools for developers and creators, plus optional Geekskai Audio Toolkit plans. Built with care.

Popular Tools

SoundCloud DownloaderSoundCloud to MP3SoundCloud to WAVSoundCloud PlaylistSoundCloud Artwork
View All Tools

Resources

BlogAbout MePricingTagsProjectsPrivacy PolicyTerms of ServiceRefund Policy

Connect With Us

mailMail
githubGitHub
twitterTwitter
linkedinLinkedin
© 2026 geekskai • All rights reserved
Random VIN test-data generator

What does a random VIN generator by year and brand produce?

A generator creates synthetic, VIN-shaped test data using a selected manufacturer prefix, year-code convention and calculated check digit. It is useful for form validation, imports, demos and automated tests. A passing check digit does not prove that a manufacturer issued the identifier, that a vehicle exists, or that the remaining attributes match that brand and year.

Open the Geekskai Random VIN Generator for sample generation and TXT, CSV or JSON export. Treat its output and decoded metadata as test fixtures. The current year selector covers 2010–2030; it does not cover every historical or future model year, and its displayed year is not an authoritative vehicle record.

This guide uses U.S. VIN rules where specified. It is not a certification that a generated identifier complies with every ISO requirement or every market’s rules.

A practical generation workflow

  1. Choose the manufacturer prefix and one of the supported years for your test scenario.
  2. Generate one value first and inspect its length, characters, year code and check digit.
  3. Generate a batch only after the single-value output fits the test you intend to run.
  4. Export TXT for a list, CSV for spreadsheet/import review, or JSON for fixtures.
  5. Keep the generated values separate from customer and real-vehicle records. Save a stable fixture when repeatable regression tests matter.

If the application needs a manufacturer-confirmed model, trim or plant, random generation is insufficient. Use an authorized real sample and the manufacturer’s decoding information, then distinguish it from synthetic parser-test data.

VIN positions: useful rules and their limits

NHTSA’s overview describes the 17-character identifier and links to its public vPIC decoder. 49 CFR 565.13 requires manufacturer assignment, permitted characters and the ninth-position check digit for vehicles covered by the U.S. regulation.

PositionWhat to testLimit of the test
1–3Manufacturer/type identifier for high-volume manufacturersA plausible prefix alone does not validate the rest of the VIN.
4–8Manufacturer-defined vehicle descriptorsRandom characters do not necessarily describe a valid model or body configuration.
9U.S. check digitConfirms a mathematical relationship, not a real vehicle identity.
10Model-year codeCodes recur; context is needed to resolve the year.
11Plant codeMeaning depends on manufacturer decoding information.
12–17Remaining identifier sectionLow-volume manufacturers use part of this section for manufacturer identification.

The allowed U.S. character set excludes I, O and Q. The content requirements in 49 CFR 565.15 also distinguish high- and low-volume manufacturers. For low-volume manufacturers, positions 12–14 participate in the manufacturer identifier; do not reduce every manufacturer lookup to the first three characters.

Year codes for the tool’s 2010–2030 range

YearCodeYearCodeYearCode
2010A2017H2024R
2011B2018J2025S
2012C2019K2026T
2013D2020L2027V
2014E2021M2028W
2015F2022N2029X
2016G2023P2030Y

This range is a convenience for test generation, not the complete coding cycle. Position 10 alone is ambiguous across the recurring 30-year sequence. For passenger cars, and multipurpose passenger vehicles and trucks up to 10,000 lb GVWR, the note to Table VII in §565.15 uses position 7 to distinguish 1980–2009 from 2010–2039: numeric versus alphabetic, respectively. Do not apply that vehicle-class-specific rule indiscriminately to every VIN.

A generator can place the desired character in position 10 without constructing a fully consistent descriptor section. If your test needs the full U.S. model-year distinction, independently inspect position 7 and the manufacturer’s descriptor rules rather than trusting the tool’s displayed year label.

Verify the U.S. check digit in JavaScript

The calculation transliterates letters, multiplies by position weights and takes the sum modulo 11; a remainder of 10 is represented by X. The ninth position has weight zero. The following example checks only the permitted character set, length and check digit:

const VIN_CHARACTERS = /^[A-HJ-NPR-Z0-9]{17}$/
const VIN_WEIGHTS = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2]
const VIN_LETTER_VALUES = {
  A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8,
  J: 1, K: 2, L: 3, M: 4, N: 5, P: 7, R: 9,
  S: 2, T: 3, U: 4, V: 5, W: 6, X: 7, Y: 8, Z: 9,
}

// This checks the U.S. check digit, not manufacturer assignment or vehicle existence.
function hasValidVinCheckDigit(vin) {
  if (typeof vin !== "string" || !VIN_CHARACTERS.test(vin)) {
    return false
  }
  const weightedSum = Array.from(vin).reduce((sum, character, index) => {
    const numericValue = VIN_LETTER_VALUES[character] ?? Number(character)
    return sum + numericValue * VIN_WEIGHTS[index]
  }, 0)
  const remainder = weightedSum % 11
  const expectedDigit = remainder === 10 ? "X" : String(remainder)
  return vin[8] === expectedDigit
}

console.log(hasValidVinCheckDigit("1M8GDM9AXKP042788")) // true
console.log(hasValidVinCheckDigit("1M8GDM9A0KP042788")) // false
console.log(hasValidVinCheckDigit("INVALID")) // false

Run this in a JavaScript environment such as Node.js. The first two examples differ only at the check digit. A successful result is not a full VIN validator: it does not validate manufacturer assignments, descriptor combinations, model-year context, or whether the identifier belongs to an actual vehicle.

For parser tests, keep both positive and negative cases: wrong length, forbidden characters, an intentionally changed check digit, and a year-code/descriptor mismatch. Test your application’s error handling as well as acceptance of a checksum-valid string.

Use manufacturer data when brand matters

A brand can have multiple identifiers across vehicle types and regions. A short static prefix table can mislead readers into treating one prefix as proof of every model in a brand’s catalog.

Use the manufacturer-submitted information exposed through NHTSA vPIC when decoding real vehicle data. NHTSA explains that decoder information is supplied by manufacturers. Record warnings and unknown fields rather than interpreting any partial result as confirmation that a generated VIN is genuine.

Export and fixture checks

  • TXT: Confirm one identifier per line and the expected number of rows.
  • CSV: Check the actual header and imported column types. Keep VINs as strings; do not let an import silently transform values.
  • JSON: Validate the exported structure before using it in a test. A metadata object and a plain list of strings are different fixture shapes.
  • Repeatability: Save the chosen synthetic fixture in your test project instead of generating a new random batch on every regression run.

Keep an explicit synthetic-data marker in the surrounding fixture or dataset. A random generator cannot guarantee that a value never coincides with a real identifier, so isolation is more reliable than assuming “random” means non-real.

Frequently asked questions

Does a valid check digit mean the VIN is genuine?

No. It verifies a checksum relationship. Manufacturer assignment and real-vehicle identity require different evidence.

Does selecting a year remove all year ambiguity?

No. The generator’s selector maps a limited range to codes. An authoritative interpretation may need vehicle-class rules, descriptor context and manufacturer data.

Can generated values be used in registration or insurance?

Use synthetic values only in clearly separated testing or demonstration workflows. Registration, title, insurance and other real-vehicle processes require confirmed vehicle records.

Is this ISO 3779 certification?

No. This is a practical test-data guide with cited U.S. rules. A 17-character string with a passing check digit is not a certification of full compliance.

For quick synthetic fixtures, use the VIN generator. For a real record, start with the actual vehicle’s identifier and an authoritative source rather than a random replacement.