The Newcastle United goalkeeper spent 120 goalless minutes on the bench, before Louis van Gaal brought him on in the nick of time for a penalty shoo-out.
Krul responded by saving two spot-kicks to send the Oranje to Sao Paulo.
The match began with Arjen Robben seeing lots of the ball – and looking threatening every time it arrived at his feet. Costa Rica nevertheless did a solid job of halting his electric darts, but when the 30-year-old drew two opponents towards him and spread play to Dirk Kuyt, the Dutch did create a big chance.
Kuyt slipped it to Memphis Depay, who faked the shot and played a deceptive reverse pass to Robin van Persie.
The Manchester United striker took and touch and unleshed a firm shot from inside the area, but Keylor Navas was equal to it.
Van Persie turned creator just before the half-hour, but Navas did brilliantly to block a firm Depay strike with his leg.
Navas then made a fine one-handed save to push a Wesley Sneijder free-kick, behind, before the Costa Rica No1 was alert to race from his line and smother the ball at the feet of Robin van Persie to ensure the sides went in at the break at deadlock.
Soon after the restart, from a set-piece, Robben faked a cross into the box but squared the ball for Sneijder, who had peeled to the edge of the box.
Bryan Ruiz had alertly tracked the Oranje No10, however, and under pressure he failed to keep his shot down.
Costa Rica has a promising spell thereafter, but they failed to trouble Netherlands goalkeeper Jasper Cillessen, with Christian Bolanos firing a free-kick well over and Giancarlo Gonzalez heading wide.
The Dutch were agonisingly close to going ahead on 82 minutes, with Sneijder’s magnificently curled free-kick coming back off the post.
And they missed a gilt-edge chance six minutes later. Sneijder’s inswinging cross from the left found the unmarked Van Persie just yards out, but he somehow failed to connect with the ball.
Then, in injury time, Daley Blind cut the ball across goal. Somehow the ball evaded multiple players in a crammed penalty-area and found Van Persie at the back post.
The Netherlands’ all-time leading marksman shot from point-blank range, but Yeltsin Tejeda deflected it up and on to the crossbar. Navas, his post and his crossbar had seen Los Ticos into extra-time.
Ron Vlaar had the first opportunity in it, his downward header forcing Navas into a smart save following a corner.
Suddenly, Costa Rica, who had barely threatened the Netherlands’ goal all evening, had two great chances in quick succession.
First, Marco Urena masterfully skipped past two challenges only for Stefan de Vrij to made a last-ditch tackle. Then Urena found himself with time and space inside the Dutch area. The Kuban Krasnodar striker shot powerfully, but Cillessen made a brilliant block.
The crossbar denied another magnificent Sniejder strike at the death, but Van Gaal was just able to get Krul on in time for penalties.
The big keeper vindicated that substitution by denying Ruiz and Urena and keeping the Dutch dream alive.