An optical transceiver includes a housing, a fastening component, a bail and an optical connector. The fastening component is movably disposed on the housing and configured to be detachably fastened with the cage. The bail includes a first connecting portion and a second connecting portion. The first connecting portion is pivoted with respect to the fastening component at a first pivot joint, and the second connecting portion is pivoted with respect to the fastening component at a second pivot joint. The optical connector is disposed in the housing and located between the first pivot joint and the second pivot joint.