Zieler joined then-champions Leicester from Hannover a year ago, but could not usurp Kasper Schmeichel as first choice under Claudio Ranieri or his successor Craig Shakespeare.
The Germany international made 13 appearances for the Foxes, the bulk of which came when Schmeichel suffered a broken hand in November.
He becomes Stuttgart's fifth signing since winning 2.Bundesliga, but is their most experienced to date.
He told Stuttgart's official website: "I am glad that the move to Stuttgart has been successful.
"The discussions with VfB officials were very convincing. It has made me believe that VfB can develop something and I would like to help."