Colombia finished top of Group C to set up a last-16 tie against Uruguay after beating Japan, who were eliminated.
Japan needed a win to stand a chance of progressing but went behind when Juan Cuadrado scored a penalty following Yasuyuki Konno’s foul on Adrian Ramos.
Shinji Okazaki’s steered header drew Japan level only for Jackson Martinez’s low strike to restore Colombia’s lead.
Martinez cut inside and slotted in a left-foot shot before James Rodriguez’s exquisite chip wrapped up the win.
Colombia used their third goal as the signal to bring on 43-year-old keeper Faryd Mondragon, whose introduction saw him become the oldest player at a World Cup finals as he broke Cameroon forward Roger Milla’s record.