Capsule for the preparation of a nutritional product in a device adapted to supply liquid in the capsule, said capsule comprising: at least one compartment (13) containing nutritional ingredients for the preparation of the nutritional product in combination with the supplied liquid, a filter adapted for removing contaminants contained in the liquid, wherein the filter is formed as a relatively rigid filter unit (18) which comprises a filter membrane (20) and ah outlet wall (23) for supporting the filter membrane the outlet wall comprising at least one liquid outlet (26) communicating with the compartment (13). The invention also relates to the filter unit (18) as such.