Japan regained their two goal lead over Denmark when substitute Shinji Okazaki scored in the 87th minute, converting an easy finish after Keisuke Honda had drawn out Thomas Sorensen.
The Danish goalkeeper came off his line to mean Honda, who had been put in behind the right side of the Danish defense. Honda cut the ball across goal with his left foot for an easy Okazaki tap-in.
Japan will finish second in Group E with six points and play Paraguay in the knockout stage.