The Estonian finished 25.6 seconds ahead of Citroen's Finnish driver Esapekka Lappi with Toyota's Finn Jari-Matti Latvala third.
Tanak also won the final Power Stage for an extra five points.
After nine of 14 rounds, Tanak has 180 points to reigning champion Ogier's 158 with Hyundai's Belgian Thierry Neuville on 155. (Reporting by Alan Baldwin in Budapest, editing by Clare Fallon)
Day 6, Sheffield