A liquid separator removing a liquid from a sample of a breathing gas flowing through an airway adapter having a channel surrounded by a wall is disclosed herein. The separator includes a chamber receiving the sample, and a membrane having an outer surface exposed to the gas flow, the membrane at least partially surrounding the chamber, which membrane separates the liquid received by the chamber. The separator also includes a supporting structure for supporting the membrane, and a connector operationally attached to the supporting structure, the connector being connectable to the adapter. The connector comprises a cavity providing a flow path for the sample from the chamber through an opening of the cavity to a sample tube. The membrane branches from a central part of the channel into at least two different branches extending to different directions.