Danes stunned after Japan join Holland
Needing only a draw to qualify from Group E, the Asians took the lead in the 17th minute when CSKA Moscow midfielder Honda bent in his set piece from 30-yards out on the right, although Denmark goalkeeper Thomas Sorenson will probably feel he should have done better.
Although not as spectacular, Endo's 20-yard effort followed on the half-hour mark when the outstretched Sorensen was beaten for the second time.
Advertisement
Hide AdAdvertisement
Hide AdJon Dahl Tomasson saw his penalty saved nine minutes from the end, but bundled in the rebound to give his side a glimmer of hope, only for Shinji Okazaki to seal Japan's triumph and book a last 16 tie against Paraguay.
Holland made it three wins from as many Group E matches with victory in their dead rubber against Cameroon.
With Holland already through to the last 16 and Cameroon out, it took Robin van Persie's 36th-minute flash of inspiration to get things going. Samuel Eto'o's second-half penalty levelled matters until substitute Klaas Jan Huntelaar's 82nd-minute winner continued his side's momentum heading into a clash against Slovakia.