An image forming apparatus includes a transfer unit that comes into contact with an object to transfer an image to the object, a facing unit that moves together with the object in a transport direction of the object to bring the object into contact with the transfer unit, and a mechanism that brings the facing unit closer to the transfer unit in accordance with movement of the facing unit in the transport to bring the object into contact with the transfer unit and then further brings the facing unit and the transfer unit closer to each other.