Gemini surfactants, butanediyl 1,4-bis(dimethyl cetylammonium bromide), pentanediyl 1,5 -bis (dimethyl cetylammonium bromide) and hexanediyl 1,6 -bis (dimethyl cetylammonium bromide) from Alkanediyl-α, ω-bis (dimethyl cetylammonium bromide) series were synthesized in laboratory and were characterized by using Nuclear Magnetic Resonance (NMR) spectroscopy. The surfactants were tested as corrosion inhibitors for mild steel in 20% formic acid. The influence of surfactants on mild steel corrosion inhibition was investigated by measuring the corrosion rate of mild steel in their absence and presence by weight loss measurements, solvent analysis of iron ions into the test solution and potentiodynamic polarization measurements. The surface morphology of the corroded steel samples in presence and absence of surfactants was evaluated by using Scanning Electron Microscopy (SEM). The synthesized gemini surfactants performed as excellent corrosion inhibitor, the inhibition efficiency (IE) being in the range of 76.66-97.41%. The IE of surfactants is slightly affected by the spacer length. The IE increased with increase in surfactant concentration and temperature. The adsorption of gemini surfactants on the steel surface was found to obey Langmuir adsorption isotherm. The results of the potentiodynamic polarization studies are consistent with the results of weight loss studies.