In this paper, we present a simple and viable route for the synthesis of germanium-tin alloys (GexSn1-x) from two different ionic liquids, namely, 1-butyl-1-methylpyrrolidinium trifluoromethylsulfonate ([Py1,4]TfO) and 1-butyl-1-methylpyrrolidinium bis(trifluoromethylsulfonyl)amide ([Py1,4]Tf2N). Cyclic voltammetric analysis showed that in the presence of both SnCl2 and GeCl4 precursors, a shoulder peak is obtained which is related to the formation of GexSn1-x. Constant potential deposition was performed to obtain GexSn1-x thin films. Furthermore, on changing the concentration of GeCl4 and SnCl2 in [Py1,4]TfO, the GexSn1-x composition could be varied.