Álvarez advanced as high as Class A ball before being traded in November 2009 with Hunter Jones to the Florida Marlins organization for Jeremy Hermida. In 2010 Álvarez was third in the Class A South Atlantic League in wins as he went 10–3 with the Greensboro Grasshoppers with a 3.58 ERA and 113 strikeouts in 108 innings. In 2011, pitching for the Jupiter Hammerheads in the A+ Florida State League, Álvarez was a mid-season All Star, and ended the season 6–5 for the Hammerheads with a 2.96 ERA, with 73 strikeouts in 82 innings. He was a two-time winner of the best changeup in the Florida Marlins farm system. In 2012 he pitched for the Jacksonville Suns in the AA Southern League. Álvarez was league Pitcher of the Week for the week ended June 25, and for the season was 6–9 with a 4.22 ERA, with 3 complete games, 1.66 walks per nine innings, and 70 strikeouts in 136.1 innings.
Detroit Tigers (2012–14)
At the end of the 2012 season Álvarez was released, and he was picked up by the Detroit Tigers on November 8, 2012, as a minor league free agent. Álvarez was invited as a non-roster free agent by the Detroit Tigers to their 2013 spring training. He played for the Class AAAToledo Mud Hens, where by June 2013 he was leading the International League in strikeouts, Walks plus hits per innings pitched, and baserunners per nine innings. Álvarez was called up to the majors for the first time on June 9, 2013, and made his debut starting in place of Aníbal Sánchez. He recorded a win and a quality start, pitching six innings while striking out seven against the Cleveland Indians. He was sent back to the Toledo Mud Hens that same day and was recalled June 20 to start again in place of Sánchez. On August 28, Alvarez was sent back to Toledo. In 2013 with the Tigers he was 1–5 with one save and a 5.82 ERA, with 31 strikeouts in 38.2 innings. With Toledo, he was 8–6 with a 2.80 ERA, 5th in the league with a.235 batting average against and 1.79 walks per nine innings, and 115 strikeouts in 128.2 innings. He was named Detroit Tigers 2013 Minor League Pitcher of the Year. Baseball America named him as having the best change up and control in the International League.
Los Angeles Angels of Anaheim/Los Angeles Angels (2014–18)
On March 21, 2014, the Tigers traded Álvarez to the Los Angeles Angels of Anaheim for shortstop Andrew Romine. He made two scoreless appearances for the Angels in 2014. In the winter of 2014–15 he pitched for the Caribes de Anzoategui of the Venezuelan Winter League, and was named Venezuelan Winter League Pitcher of the Year after leading the league in wins. Álvarez was 6–1 with two saves and a 1.91 ERA, with 40 strikeouts in 56.2 innings. Álvarez was called upon by the Angels 64 times in the 2015 season, posting a 4–3 record with a 3.49 ERA, and 59 strikeouts in 67 IP. He was tied for sixth in the American League with 19 relief appearances of more than one inning pitched. In 2016, Álvarez made 64 appearances for the Angels. He registered a 1–3 record and an ERA of 3.45, with 51 strikeouts in innings. He pitched in four games for Team Venezuela in the 2017 World Baseball Classic. Álvarez made 64 appearances for the third straight season in 2017 for the Angels, registering an 0–3 record with one save and an ERA of 3.88 and 45 strikeouts in innings. Among left-handed relief pitchers, his 83% stranded rate was 6th in the major leagues. Lefthanders batted.245/.252/.462 against him, with one walk and 26 strikeouts. In 2018, Álvarez was 6–4 with one save and posted career bests in games, wins, and ERA, and tied his career high with 59 strikeouts. He allowed three home runs over 63 innings, and limited left-handed batters to batting.206/.265/.338 against him with nine walks and 34 strikeouts. He was 5th among all MLB relievers, stranding 86.0% of inherited runners.
Philadelphia Phillies (2019–present)
On December 6, 2018, Álvarez was traded to the Philadelphia Phillies, for relief pitcher Luis Garcia. Alvarez made his first start in 5 years on June 1, 2019, as the Phillie's opener against the Los Angeles Dodgers. In 2019 with the Phillies he was 3-4 with one save and a 3.36 ERA, as he pitched in 67 games over 59.0 innings.