A macroporous polymeric acid catalyst was prepared for the direct esterification of carboxylic acids and alcohols that proceeded at 50-80 °C without removal of water to give the corresponding esters with high yield. Flow esterification for the synthesis of biodiesel fuel was also achieved by using a column-packed macroporous acid catalyst under mild conditions without removal of water.