Lime water turns milky when it comes in contact with carbon dioxide. Lime water is Ca(OH)2 and it reacts with carbon dioxide to form calcium carbonate which is white in colour and makes the solution milky. Reaction: Ca(OH)2 + CO2 ---------> CaCO3 + H2O
Lime water turns milky when CO2 (carbon dioxide) is passed through it. So to test if a given liquid is lime water, pass CO2 through it, if it turns milky, then it is limewater. You can reverse this chemical reaction by putting vinegar in it.