An image forming apparatus, includes: an image forming unit that forms an image on a recording sheet; a casing that encloses the image forming unit and that has an ejection port configured to eject the recording sheet on which the image are formed; an ejection tray that stacks recording sheets ejected from the ejection port; a main frame side connector configured to electrically connect to an external device, the main frame side connector connectable to an external device side connector provided in the external device while at least a part of the external device is disposed outside the casing; and a supporting member that displaceably supports the main frame side connector with respect to the casing.