Manchester United midfielder Shinji Kagawa then offered a reminder of his quality with a penetrating run at the heart of the Costa Rica defence and after a smart one- two, his cool finish made it 2-1. (Agencies)
Alberto Zaccheroni's team played a smart and positive passing style from the outset and will take great encouragement from their display.
From the outset Japan dominated and they should have made more of their opportunities in the opening 45 minutes.
Yoshito Okubo had an effort well saved by Costa Rica keeper Keylor Navas and Keisuke Honda should have done better inside the area but over-elaborated as he tried to round Navas.
Costa Rica then grabbed the lead against the run of play with Junior Diaz bursting down the left flank to find Bryan Ruiz at the back post and the striker made no mistake from close range.
Japan continued to enjoy the better of the game after the break and they deservedly drew level on the hour when Honda slipped the ball into the path of Yasuhito Endo whose first time strike gave Navas no chance.
A good performance from Japan, and worrying night for Costa Rica, was completed in injury time when the Ticos' defence failed to clear a Kagawa cross and Yoichiro Kakitani pounced on the loose ball and slid it into the bottom corner.
The result and performance does not bode well for a Costa Rica team that faces tough opposition against Uruguay, England and Italy in Group D.
Japan, who face Ivory Coast, Greece and Colombia in Group C in Brazil will play another pre-World Cup friendly against Zambia in Tampa on Friday.
Manchester United midfielder Shinji Kagawa then offered a reminder of his quality with a penetrating run at the heart of the Costa Rica defence and after a smart one- two, his cool finish made it 2-1.