Humidifier comprising a container (214) and a semi-permeable membrane dividing up the container into a water part, which in the operational state of the humidifier is filled at least partly with water, and an air part, which has an inlet and an outlet for an airflow to be humidified. The semi-permeable membrane comprises a number of hoses (921) with semi-permeable walls whereby the humidifier occupies a little space.