Peroxyformic acid compositions for treatment and removal of biofilm growth and mineral deposits on membranes for energy services applications are disclosed. In particular, peroxyformic acid compositions are generated in situ or on site generation for the reduction and prevention, of biofilms and the mitigation of mineral buildup on the membranes. The compositions according to the invention are compatible with the membranes under application of use conditions.