Freese went 3-for-3, driving in two runs and scoring two others and Carpenter was 3-for-5 with a run batted in. Four other St. Louis batters had two hits each.
Cardinals' starter Jake Westbrook (9-8) picked up the win despite allowing five consecutive singles and a sacrifice fly that allowed the Dodgers to score four times in the fifth inning.
Westbrook, however, gave up just two other hits in his seven-inning outing and walked one. He struck out six. Jason Motte struck out three in the ninth in getting his 22nd save.
Los Angeles starter Chris Capuano (10-6) allowed seven consecutive batters to reach in the bottom of the fifth when the Cardinals had a four-run rally of their own.
Nine of the 11 hits he allowed came in the fourth and fifth innings. St. Louis opened the fourth with four consecutive hits, including singles by Freese and Carpenter, in taking a 2-0 lead.
After the Dodgers went up 4-2 in the fifth, St. Louis answered with the rally in which Freese singled in two runs and Carpenter had another hit.
Matt Holliday hit a home run in the sixth -- his 17th in 2012 -- to complete the scoring.