The defender joined Leipzig from VfL Bochum in August 2014 and made 159 appearances, registering eleven goals and ten assists.
Klostermann, a versatile player who can operate centrally or on the right, has won 8 caps for Germany.
His previous contract had been due to run out at the end of next season.
“I am pleased I have extended my contract at RB Leipzig and there is now clarity about my future,” Klostermann said.
“I have been at Leipzig for six years, have made great personal and athletic development here and have so far been looking back on a very successful time with the club, which will certainly have the potential for further success in the future and of which I would like to be part.
“I feel very comfortable in the club and in the city, have always felt confidence here and have become a senior international.”
Sporting director Markus Krosche added: “Lukas is one of our most consistent players and already a very experienced player who has made incredible jumps in his development, still only 23 years old.
“We’re very happy to have extended his contract until 2024. Defensively he is very versatile, which gives us many options.
“Lukas is very important to us and we’re convinced that his important to us and the team will continue to grow.