An optical device is made up of a glass substrate, an optical fiber array fixed to an upper portion of the glass substrate, a slit that extends from an upper surface of the optical fiber array into the glass substrate, a filter member inserted into the slit, and a resin filled in an interval between the slit and the filter member. An upper end of a light-incident surface of the filter member is positioned substantially in alignment with upper surfaces of the optical fibers, and an upper end of a light-exiting surface of the filter member is disposed at a position below the upper surfaces of the optical fibers.