An optical waveguide has a semiconductor laser section, an intermediate section, and an optical modulator section on a surface of a substrate. The distance of a surface extending outwardly from and transverse to both sides of a mesa stripe in the semiconductor laser section from the surface of the substrate is larger than the distance of a surface extending outwardly from and transverse to both sides of the mesa stripe in the optical modulator section from the surface of the substrate. The distance of a surface extending outwardly from and transverse to both sides of the mesa stripe in the intermediate section from the surface of the substrate decreases from the semiconductor laser section toward the optical modulator section.