Dietrich was hit by Jon Jay's batted ball that hopped up at him while setting up for a double play in the fifth. Dietrich, who walked off the field holding a towel to his face, did not need stitches. He said he was day to day.
"They told me, `Ice it up, take some Tylenol and see where we're at in the morning," said Dietrich, who was back at Roger Dean Stadium shortly after having X-rays at a local hospital.
"I was talking the whole time, but obviously was in some pain," he said. "I'm feeling okay and have no headaches. It could've been a lot worse."
Marlins manager Mike Redmond was relieved that Dietrich wasn't seriously injured.
"You don't want to see anyone get hurt this late in the spring but it looks like he'll be okay and it's just a matter of when we get him back out there."
Marcell Ozuna hit his first home run of the spring in the sixth inning, a tiebreaking shot to left field on a 2-0 pitch. Ozuna hadn't had a hit in his last four games.
Jose Fernandez struck out eight in six innings but gave up three runs and five hits.
Pitcher safety was a topic of conversation a day after Cincinnati closer Aroldis Chapman was hit by a line drive in a Cactus League game on Wednesday.
"It's a terrible thing and you never wish that on anybody," said Adam Wainwright, who will pitch opening day for the Cardinals. "He's one of the best pitchers in the game."
Wainwright, however, said you can't think about being hit in the head while out on the mound.
"One day we'll be playing with some kind of head gear, probably," Wainwright said. "It would have to be very sleek and the exact opposite of what they tried to introduce this year."
Fernandez said he heard about Chapman from Instagram and Twitter Thursday morning.
"This may sound funny but when I was warming up today I threw a first pitch for a strike and the second pitch I think, `God I don't want to get hit," Fernandez said. "No, I never thought that before."
Cardinals: Lance Lynn pitched four innings, allowing three runs, four hits, three walks and struck out five.
Marlins: Fernandez threw 88 pitches, 55 for strikes.
"You know what? I gave up three runs and I'm not upset about it," Fernandez said. "I think that I commanded my pitch well and Salty was incredible behind the plate."
Cardinals: Left-hander Tyler Lyons was optioned to Triple-A Memphis. That move leaves 40 players in the Cardinal spring training camp -- 33 roster and seven non-roster invites.
Cardinals: Mark Ellis remains sidelined with left knee tendinitis.