An image forming apparatus includes a belt unit detachably installed in a main body, a first positioning mechanism provided in the main body to rotatably support a first support roller, a second positioning mechanism provided in the main body to rotatably support a second support roller, an urging mechanism that urges the second support roller in a direction to move the second support roller away from the first support roller, a reference protrusion provided in the belt unit in a predetermined positional relationship with the first support roller, and a reference wall disposed to face the reference protrusion in the main body at a position closer to the second support roller than the reference protrusion.