In this research, the decolorization of two kinds of synthetic dye wastewater with azo dyes reactive green RG19and RB171as model compounds were investigated by using a self-made electrocoagulation system, which was composed of sacrificial iron anode and sodium chloride electrolyte. The impact of several factors such as pH, initial dye concentration, hydraulic retention time and conductivity on removal was analyzed, which indicated that the decolorization efficiency can both reach more than 90% within 120mins when the initial dye concentration was less than 300ppm, sodium chloride concentration was 2g/L and initial pH was less than 7.