The deal is the first major move for Los Angeles since Andrew Friedman left the Rays to become president of baseball operations for the Dodgers.
Tampa Bay received right-handers Jose Dominguez and Greg Harris in the trade announced Thursday night, and the Dodgers also obtained left-hander Adam Liberatore.
Peralta, a 38-year-old right-hander, was 3-4 with a 4.41 ERA and one save in 69 games last season, when he struck out 74 in 63 1-3 innings. A 10-year major league veteran, he spent the last four seasons with the Rays after pitching for the Los Angeles Angels, Kansas City, Colorado and Washington.
He joins a bullpen where Brian Wilson was the primary setup man for closer Kenley Jansen.
''Joel's significance to the Rays transcended his on-field performance. He was a clubhouse leader who always sought ways to make the organization better,'' said Matt Silverman, who succeeded Friedman as the Rays' president of baseball operations.
Tampa Bay had exercised Peralta's $2.5 million option for next season. The Dodgers inherit options for the same amount for 2016 and 2017.
The 24-year-old Dominguez made nine appearances for the Dodgers in 2013 and five this year. He also was 1-2 with a 3.24 ERA and 10 saves at Triple-A Albuquerque. Harris, 20, was 7-6 with a 4.45 ERA in 16 starts and six relief appearances at Class-A Great Lakes. Liberatore, 27, was 6-1 with a 1.66 ERA in 54 games at Triple-A Durham.
In other roster moves, Tampa Bay designated for assignment infielder Cole Figueroa, right-hander Michael Kohn and catcher Jose Molina.
Molina hit .178 with no homers and 10 RBIs in 247 plate appearances last season and is guaranteed $2.75 million for 2015.
The Rays selected contracts from their minor league system of right-hander Matt Andriese, infielder Ryan Brett, left-hander Grayson Garvin, outfielder Mikie Mahtook and catcher Justin O'Conner.