The 21-year-old Japanese driver, who started kart racing in 1996, is currently racing in the Formula 3 Euro Series with Manor Motorsport.
"For anyone with an interest in motor racing, Formula One is the ultimate objective and I am delighted that Williams, one of the senior names in the sport and a team that exists solely to race, has given me this great chance," Nakajima said.
Nakajima, the son of former F1 driver Satoru Nakajima, will begin testing later this year with Nico Rosberg and Alex Wurz, reports AP.
"Kazuki has consistently demonstrated his potential through karting and other junior formulae," Williams boss Frank Williams said. "Having assessed both his potential in the car and his aptitude out of it, we believe he has the necessary ingredients to graduate to Formula One in a testing role."
Rescuers found the pilot of one of the two Su-34 fighters that had collided in midair in the Far East on January 18