* Check your vehicle's paperwork: Your owner's manual or registration should list the engine.
* Look under the hood: The engine code is usually stamped on a metal plate affixed to the engine block itself. It might be near the valve cover or on a side of the engine.
* Use your VIN: You can use your Vehicle Identification Number (VIN) to look up the specifications, including the engine code, on a Ford parts website or a vehicle history website.
Without knowing the year and possibly trim level of your specific Ford Ranger 4x2, it's impossible to give you the engine code.