Hydrocarbons are prone to bacterial and fungal contamination. Bacteria and fungi live and proliferate in water droplets within the fuels and on surfaces surrounding them. This can cause corrosion in oil exploration and production, clogging of fuel lines in aviation and higher emissions in diesel combustion engines to state few examples. State-of-the-art is the addition of biocides to fuels, which is associated with several disadvantages like costs and environmental burden. A novel technology to prevent biofouling in hydrocarbons is presented here. By applying an anti-microbial coating to the surfaces of hydrocarbon processing units, pipelines, and fuel containers, microbial growth can effectively be reduced. The coating can be a paint or varnish, for instance, epoxy resin as already used in aircraft fuel tanks to today. It contains transition metal oxides, thus an acidic surface is produced. This acidic surface was shown to eliminate up to 109 colony forming units per milliliter (CFU.ml-1) of bacteria of the species of agrobacterium tumefaciens and others in diesel, kerosene, and biodiesel, where other anti-microbial coatings based on silver did not perform. The technology has the potential to bring huge cost savings to the oil and gas industry, alongside an increase in safety and equipment reliability.