Filling line for heat-treating and filling a liquid, comprising a pre-heater (1) for pre-heating the liquid, a heater (2) for heating the liquid after pre-heating, a cooler (3) for cooling down the liquid after heating, an a filling unit (4) for filling the liquid, where the filling line is suitable for hot filling and cold filling, where the liquid path from the pre-heater to the filling unit for hot filling differs from the liquid path from the pre-heater to the filling unit for cold filling, and the filling line comprises a switching option (5) for switching between the two liquid paths; and a method for heat-treating and filling a liquid in which such a filling line is used.