Since 1981 every car and light truck sold in the US has a 17-character VIN, and one character of it, the 8th on most American makes, is the engine code. Older VINs often carry it too, in a different place. Pick a make for the codes by year.
Paste a 17-character VIN to see which engine the vehicle left the factory with.
On 1981-and-later American cars and trucks it is usually the 8th character. Before 1981 the position varies by maker and year; each make's page lists it by model.
It tells you what the car left the factory with. Engines get swapped, so check the code stamped on the block or the label on the engine as well.
On 1981-and-later VINs, yes. Use it to find the right year in the tables.