Croatia s midfielder #10 Luka Modric greets the crowd before being substituted during the Qatar 2022 World Cup round of 16 football match between Japan and Croatia at the Al-Janoub Stadium in Al-Wakrah, south of Doha on December 5, 2022.
Mario Pasalic struck the winning spot-kick after Dominik Livakovic saved three penalties.
Earlier, Ivan Perisic had pulled Croatia level in the 55th minute of normal time following Daizen Maeda's opener for Japan just before the break.
But no side could find a winner either in 90 minutes or in extra-time as it finished 1-1.
"It seems that we can't do it without a drama," Modric, whose team were beaten finalists in 2018, said. "We are more than happy to reach the quarter-finals.
"It was a very difficult game against a very tough team."
The match in Qatar continues a pattern for Croatia.
Seven of their past eight knockout games at major tournaments have gone to extra time, the only exception being their final defeat by France in Russia four years ago.
Modric said Croatia had not played at their top level but had found a way to win.
"We showed character when we came back from the deficit... Livi (Livakovic) performed a miracle today. A very tough, exhausting match."
Coach Zlatko Dalic said reaching the last eight was a "major result".
"Don't ever underestimate a Croatian," he said. "Whenever this happens, one regrets it. We are going all the way."
This will likely be the last chance to win the World Cup for a talented but ageing generation of Croatian players.
"We showed that we are of the level necessary to go far. We have finished third (in 1998) and second and now we are in the quarters," Dalic said.
"We have earned the right to hope for great results... we won't give up, we will keep fighting to achieve our World Cup dream."
Dalic's team will next face either Brazil, seeking their sixth world crown, or South Korea and he is convinced his team can prevail regardless of who wins that match later on Monday.
"If I could choose I would choose South Korea, but if it's Brazil then never mind. Let's give our best and play our hearts out for the win," Dalic added.
"The players don't give up, they reflect the spirit of the Croatian people. We have been through so much pain... the whole of Croatia looks to them."
Check the 2022 World Cup matches and statistics.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)