An optical module includes a substrate, a package, and a flexible substrate. The substrate is provided with an electrode. The package includes a housing fixed to the substrate, a receiving unit that optically demodulates a received optical signal to convert the optical signal into a reception electrical signal, an output terminal that is provided on a surface of the housing and outputs the reception electrical signal, an input terminal that is provided at a height from the substrate different from a height of the output terminal and receives a transmission electrical signal, and a transmitting unit that optically modulates the transmission electrical signal received from the input terminal and transmits an optical signal resulting from optical modulation. A flexible substrate has flexibility and includes a signal electrode that connects one of the output terminal and the input terminal to the electrode arranged on the substrate.