The singer, 36, has spoken openly about her experience of addiction and wrote extensively about her use of drugs and alcohol in her 2018 autobiography My Thoughts Exactly.
The Smile and Not Fair hitmaker shared a series of photos of herself on Instagram and wrote: “2 Years Drug and Alcohol free today ! Getting clean is the BEST thing i ever did, and i’ve done a lot of cool shit.
“Come see me in the play i’ve been working on. @222aghoststory link in bio for tix !”
A screenshot from her phone suggested she had reached step 12 of her sobriety programme.
Allen is due to make her West End debut in supernatural thriller 2:22 – A Ghost Story at the Noel Coward Theatre this summer.
She will be joined on stage by EastEnders star Jake Wood, City Of Angels actor Hadley Fraser and Julia Chan of Silent House.
Models Adwoa Aboah and Daisy Lowe, presenter Stacey Dooley and fashion designer Kim Jones were among those who congratulated her on her sobriety milestone with posts on social media.
“Congratulations stunner face,” commented Aboah.
Allen surprised fans when she tied the knot with Stranger Things and Black Widow actor David Harbour, 46, in a private ceremony in Las Vegas in September 2020.
The pair are thought to have been in a relationship since summer 2019.
Allen was previously married to builder Sam Cooper, the father of her two daughters.