A method for degumming and/or refining crude oil containing impurities involving mixing the crude oil with degumming agents, i.e., water or acid, and subjecting the mixture to flow-through, hydrodynamic cavitation processing. The cavitational processing transfers impurities in the crude oil to a water phase for easier separation. The water phase may be separated from the oil phase by commonly available separation methods.