The invention relates to a compact type in-line liquid separator. The compact type in-line liquid separator comprises a gas inlet tube, a vortex generator, a separating cavity, a gas discharge tube, a liquid discharge tube and a liquid-level control valve, wherein the gas inlet tube, the vortex generator, the separating cavity and the gas discharge tube are connected by a flange in sequence; a guide vane of the vortex generator is in tight fit with a vortex generator housing; the guide vane can whirl after a gas-liquid mixture flows through the guide vane in the housing; the liquid discharge tube is connected with the tail end of the separating cavity, and the liquid-level control valve is mounted at the tail end of the liquid discharge tube. The liquid separator is mainly used for separating a liquid in the gas-liquid mixture( with a gaseous phase as a main body), so that the compact type in-line liquid separator, which is simple in structure, convenient for mounting, relatively low in pressure drop and high in separating efficiency, can be provided for the fields of offshore platforms, deepwater or ultra-deepwater oil and gas development (petroleum, natural gas, chemical engineering, biology and environmental protection), and the like. The device can be mounted and operated under a condition of complex environment and a limited space, can be used for effectively removing the liquid in the gas, and is high in reliability.