A board-to-board connector is disclosed. The board-to-board connector comprises a first connector having a first terminal and a first housing provided with a recessed part, a second connector having a second terminal that contacts the first terminal and a second housing provided with a raised part that inserts into the recessed part, and a switch that electrically detects the fit completion of the first connector and the second connector.