Hydrophobic ionic liquids (ILs) based on cations with long alkyl side-chains (e.g. N-octadecyl-N′,N′′,N′′′-trimethylammonium bis(trifluoromethylsulfonyl)imide ([C18tma][NTf2])) are switchable ionic liquid/solid phases with temperature that behave as sponges. As liquid phases, they are excellent monophasic reaction media for lipase-catalyzed methanolysis of triolein, resulting in fast and efficient biodiesel synthesis, e.g. up to 100% yield in 8 h at 60 °C, with exceptional enzyme stability (up to 1370 days half-life time at 60 °C). As solid phases, the reaction mixture can easily be fractionated by iterative centrifugations at controlled temperature into three phases, i.e. solid IL, glycerol and pure biodiesel. A straightforward and sustainable approach for producing biodiesel has been developed, allowing full recovery and reuse of the biocatalyst–IL system for successive cycles and suitable for scaling-up.