This oil separator comprises a separating part for separating oil contained in a gas fuel from the gas fuel, a drain tank for retaining the separated oil, and a detection mechanism for detecting the amount of oil retained in the drain tank. The separating part is disposed in the area in the drain tank that is vertically at the top. The detection mechanism is fixed to a side wall of the drain tank so as to be positioned vertically lower than the separating part inside the drain tank.