The Sharks announced the new contracts through their Twitter account.
Stalock completed his first full NHL season in 2013-14, going 12-5-2 with a 1.87 goals-against average, 932 save percentage and two shutouts in 24 regular season games.
The 26-year-old St. Paul, Minn., native started one game in the playoffs, allowing just four goals in three appearances overall.
Brown, 28, came over from Edmonton in an early season trade, finishing with two goals and three assists with 94 penalty minutes in 56 regular season games.
The Chicago native has also played for Anaheim, Vancouver and Toronto in his NHL career, with 17 goals and 14 assists in 337 regular season games, with 666 penalty minutes.
San Jose said each player received a two-year deal, but did not reveal financial details. Brown earned $725,000 US last season, with Stalock making $625,000.