Polymer thin films of poly(4-vinylpyridine), and copolymer of methyl methacrylate and methacrylic acid were prepared by electrolysis of an aqueous solution containing a surfactant with ferrocenyl moiety and corresponding polymer. The film thickness increased linearly with the amount of electricity. The morphology of the films was investigated by scanning electron microscopy.