The former couple put separate messages on their Instagram pages.
Madonna posted several images of herself with Rocco through the years.
They showed Rocco as a baby having his first haircut, dancing on stage and walking down the street with his phone to his ear.
She wrote: “Happy Birthday Rocco. How did 20 years go by so fast?
“I love you more than you will ever know. ”
Film director Ritchie wrote: “To my first born, you’ve given me more than I can ever give you. Happy 20th birthday Rocco.”
He posted snaps of himself kissing Rocco as a baby, and giving him a peck in later years.
Madonna is also mum to daughter Lourdes and four adopted children – David – who she adopted with Ritchie – Mercy, Stella and Esther.
Ritchie later married Jacqui Ainsley and they have three children – Rafael, Rivka and Levi.