In March 2017, Williams scored the animated short film Dear Basketball, directed by Glen Keane and based on a poem by Kobe Bryant.
Williams wrote the music for Star Wars: The Last Jedi, the eighth episode of the saga, released on December 15, 2017, and its sequel Star Wars: The Rise of Skywalker, which was released on December 20, 2019. Also in 2017 he scored Steven Spielberg's drama film The Post.
A three-disc box set compilation of all of Williams's musical scores for Spielberg's films, John Williams & Steven Spielberg: The Ultimate Collection, was released on March 17, 2017, and includes two previous score compilations from 1991 and 1995.
Williams's body of work in film composing was featured in the 2017 documentary film SCORE: A Film Music Documentary.
On April 13, 2017, at Star Wars Celebration Orlando, Williams performed a surprise concert with the Orlando Philharmonic Orchestra featuring "Princess Leia's Theme" (a tribute to the recently deceased Carrie Fisher), "The Imperial March" and "Main Title" followed by George Lucas saying, "The secret sauce of Star Wars, the greatest composer-conductor in the universe, John Williams".