Negotiations had reached a stalemate until Real presented a revised offer on Wednesday, which Vinicius is understood to have welcomed.
He moved to Real from Brazilian club Flamengo in 2018 and agreed a contract extension three years later.
After 18 months of talks between Real and his representatives over fresh terms, he has now committed to stay at what he has called the club of his “dreams”.
He returned on Monday for his first pre-season training session and medical checks following his World Cup campaign with Brazil.
Vinicius has scored 128 goals in 375 appearances for Real in all competitions and has 13 goals in 54 caps for Brazil.
He has helped Real lift two Champions League titles, three La Liga crowns and one Copa del Rey during his time at the club.
Arsenal were ready to step up their interest had the Brazilian rejected Real’s proposal, but the Premier League champions will now look elsewhere as they seek a left-sided forward.
Vinicius’ new deal coincides with Real announcing the signing of Ivory Coast winger Yan Diomande from RB Leipzig for a fee rising to £120m (€140m).
Diomande is Real’s sixth summer addition under new head coach Jose Mourinho, joining Bernardo Silva, Ibrahima Konate, Denzel Dumfries, Marc Cucurella and Carlos Espi.
Real are also pursuing Manchester City and Spain midfielder Rodri, but now face competition from arch-rivals Barcelona.
