The iodoform test is a test to determine if an organic compound is ethanol or contains a secondary alcohol (CH3—CH(OH)R). Potassium iodide and sodium hypochlorite solution are added to the organic compound in the presence of sodium hydroxide solution. Potassium hypoiodite forms, which then oxidizes the CH3—CH(OH)R group to CH3COR. Potassium hypoiodite replaces the hydrogen attached to the carbon atom adjacent to the carbonyl group with iodine. The carbon carbon bond is cleaved to give the iodoform. The iodoform is a yellow color.
The reaction is as follows:

This test can also be used to determine whether an aldehyde or ketone with the structure CH3COR is present in the organic compound. This test only works for the aldehyde ethanal. The iodoform test is a haloform reaction because a halogen in basic conditions reacts with an aldehyde or ketone.
Materials
Test tubes
Test tube rack
10% potassium iodide solution
Sodium hypochlorite solution
Dioxane
Sodium hydroxide
Potassium iodine iodine reagent: prepared by dissolving 20 g of potassium iodide and 10 g of iodine in 100 mL of water.
Compound to be tested.
Safety
Sodium hydroxide is corrosive. Sodium hypochlorite is corrosive and an environmental hazard. Potassium iodide is harmful, a health hazard, and an environmental hazard. Dioxane is flammable, harmful, and a health hazard.
Procedure
There are 2 methods.
First method
Put 0.2 mL of the compound in a test tube.
Add 10 mL of 10% aqueous potassium iodide solution and 10 mL of freshly prepared sodium hypochlorite solution.
Warm gently.
黄水晶的碘仿如果te分开st is positive.
Second method
Dissolve 0.1 g or 4 to 5 drops of the compound in 2 mL of water. If it does not dissolve, add dioxane drop by drop to get a homogeneous solution.
Add 2 mL of 5% sodium hydroxide solution followed by potassium iodide-iodine reagent dropwise with continuous shaking till a definite dark colour of iodine persists.
Allow the reactants to remain at room temperature for 2-3 minutes.
If no iodoform separates:
A yellow precipitate of the iodoform is obtained if the test is positive.
References: