The Brazil international, who had two years remaining on his current deal, scored 13 goals in 59 games for the Blues last season.
Willian, 27, joined from Russian side Anzhi Makhachkala for a reported £30m in 2013.
"It's a dream to continue with this club and over the next four years I will try to help the team win more trophies," he said.
Willian, who has scored 19 goals in 140 matches for Chelsea, was named player of the year last season as the club finished 10th in the Premier League.
He has won 30 caps for Brazil since making his debut in 2011, scoring six goals.
Last week, Chelsea signed Belgium striker Michy Batshuayi from Marseille for a fee believed to be worth £33m, their first capture under new manager Antonio Conte.

Vinyl records used to be one of the only ways to buy music up until the 1980s but was then overtaken by CDs, MP3s and online streaming.
But the latest figures show vinyl is making a comeback with sales reaching an 18-year high in 2014, at 1.29 million. The sales of vinyl albums are also predicted to grow by another 70% this year.
The charts company said it was responding to "the huge surge of interest" that has seen vinyl sales climb.
"This isn't just about rock acts targeting men in their forties and fifties. I've got a 15-year-old daughter and her friends have all started to collect vinyl," said chief executive Martin Talbot.
The new weekly vinyl albums and singles charts will be published on the Official Charts Company website.
The first official vinyl albums chart was topped by All Time Low's Future Hearts.
The US rockers also topped the UK album chart for the first time in the week's charts broadcast on BBC Radio 1 yesterday.
Chasing Yesterday by Noel Gallagher's High Flying Birds is 2015's biggest-selling vinyl album so far.
Brit Award-winners Royal Blood and Arctic Monkeys also feature in the top 10 of the year.
Bestselling singles include David Bowie's Young Americans and the Mark Ronson and Bruno Mars hit Uptown Funk.

Real - who have won 29 of those 38 matches - are one short of equalling a best-ever run by a La Liga team.
James Rodriguez scored twice as he made a rare start in the absence of the rested Cristiano Ronaldo.
Raphael Varne also headed home to put Real firmly in control with the second leg in Seville on 12 January.
It is a second leg which now appears a formality amid a hectic schedule that could see Real play 21 times in 11 weeks.
Madrid started a second consecutive home game without any of their first-choice front three with Karim Benzema on the substitutes' bench, Ronaldo rested and Gareth Bale sidelined with a long-term ankle injury.
Rodriguez had previously said he would consider his future in January after playing a minor role so far this season, but made the most of a rare start by scoring a spectacular long-range opener and adding his second from the penalty spot after Luca Modric was fouled by Mariano.
Real Sociedad also took a huge step towards the last eight with Willian Jose, Carlos Vela and Mikel Oyarzabal scoring in a 3-1 win over Villarreal.
Chelsea midfielder Willian has signed a new four-year contract with the club.
[NEXT_CONCEPT]
The UK's first weekly vinyl chart has been launched by the Official Charts Company as sales of vinyl albums and singles continue to rise.
[NEXT_CONCEPT]
Real Madrid extended their unbeaten run to 38 games with a 3-0 victory over Sevilla in the first leg of their last-16 Copa del Rey tie at the Bernabeu.