Werner, who has scored 32 goals in 43 appearances this season, will stay with Leipzig for the remainder of the Bundesliga season before joining Chelsea in July, subject to passing a medical examination.
The 24-year-old made his international debut in 2017 and has netted 72 times in four seasons with Leipzig. Last November he became the youngest player to make 200 appearances in the Bundesliga.
"I am delighted to be signing for Chelsea, it is a very proud moment for me to be joining this great club," said Werner.
"I of course want to thank RB Leipzig, the club and the fans, for four fantastic years. You will forever be in my heart.
"I look forward to next season with my new teammates, my new manager and of course the Chelsea fans. Together we have a very successful future ahead of us."
Known for his pace and clinical finishing, Werner will join a strike force that also includes France international Olivier Giroud and England international Tammy Abraham.
He is Chelsea's second signing ahead of the next season, alongside Ajax winger Hakim Ziyech.
"We are very excited that Timo Werner has chosen to join Chelsea," said Chelsea director Marina Granovskaia.
"He is a player who was coveted all over Europe and it is no surprise, he has that rare mix of being young and exciting and yet established and proven.
"We can't wait to have Timo on board, but until then we wish him and RB Leipzig all the best for the rest of this season."