"It happened," Platt wrote on Twitter alongside a photo of himself having a conversation with the music megastar.
Beyonce attended the stage production Thursday at the Music Box Theatre in New York City. She was able to see the Tony award-winning Platt perform before he exits the title role on Nov. 19.
Platt's castmates, including Laura Dreyfuss and Kristolyn Lloyd, also shared photos and videos from Beyonce's visit on social media.
"I'm not okay," Dreyfuss wrote on Instagram alongside a group photo featuring a smiling Beyonce in the middle of the cast of Dear Evan Hansen.
"The Aftermath," Lloyd captioned a video on Twitter featuring her castmates freaking out after Beyonce had left.
Platt recently signed on to guest star in an episode of NBC' upcoming revival season of Will & Grace.