The 27-year-old goalkeeper, who leaves Levante for the Santiago Bernabeu, was a star performer as Costa Rica reached the quarter-finals in Brazil.
A statement published on Real's official website on Sunday evening read: "Real Madrid CF and Levante UD have reached an agreement over the transfer of Keylor Navas, who will be tied to the club for the next six seasons.
"The player will be presented on Tuesday 5 August at 1pm (local time) in the Bernabeu's royal box, after undergoing the relevant medical examinations.
"Subsequently, Navas will tread the turf of the Bernabeu for the first time and will address the media in the press room."
The deal, which is reported to have required Real to pay €10m to Levante to activate the keeper's release clause, could have ramifications for Madrid stopper Diego Lopez. Lopez was Madrid's first-choice keeper in Primera Division matches last season but club captain Iker Casillas started every game in the Copa del Rey and throughout Real's successful UEFA Champions League campaign.
The former Sevilla keeper's agent recently brushed aside reports that his client was set to join Serie A side Napoli. However, the signing of 27-year-old Navas, whose outstanding performances in Brazil helped his nation top Group D and reach the last-eight for the first time, certainly means serious competition for Casillas.
The 31-year-old flopped in Brazil, conceding seven goals in Spain's defeats to the Netherlands and Chile which saw Vicente del Bosque's side crash out of the tournament at the group stage.