His agent Tim Hancock said he died at his holiday home in Portugal.
Among his other hit shows were ‘Allo ‘Allo, It Ain’t Half Hot Mum and Hi-De-Hi!
A statement released by his family said Croft “died peacefully in his sleep at his house in Portugal earlier today”.
It went on: “He was a truly great man, who will be missed by all who had the great fortune of knowing and loving him. We know that he would of been proud that you had all been watching.”
Croft was born into showbusiness. His parents were both actors and he appeared in a cinema advert as a child, before landing a small part in a 1939 film of Goodbye, Mr Chips.
But the war intervened and a cinema career was put on hold while he served in the Royal Artillery, eventually rising to the rank of Major.
He wrote scripts for pantomimes before working in television as a producer, director and writer.
His partnership with Jimmy Perry proved to be one of British television’s most successful. Together they wrote Dad’s Army, It Ain’t Half Hot Mum, Hi-De-Hi and You Rang, M’Lord?
He also worked with Jeremy Lloyd on shows including Are You Being Served? ‘Allo ‘Allo and Grace and Favour.
Croft, who was awarded the OBE in 1978, is survived by his wife, children and grandchildren.
Dad’s Army star Ian Lavender said: “He was an absolute joy to work with. He was the man who I worked with most in TV for the first 10 years of my acting life.
“He was a one-man band, a director, writer and producer. He taught me about television comedy.
“David was a lovely, gentle, quiet man, who used few words, but they were well chosen.”
Lavender, who played Private Pike in the sitcom, added: “A lot of his direction was through nods, winks, and smiles in rehearsal rather than pages of notes and discussions.
“He was a great believer in gently nudging you into doing what he wanted you to do.
“He was the perfect person to teach me the ropes. But I had a shock later, because I assumed that everyone would be like that.
“He was very content with what he was doing. There are not many people, who can see something they made 40 years ago still pulling in audiences in their millions.”
Melvyn Hayes, who starred in It Ain’t Half Hot Mum, paid tribute to Croft, saying: “The man was a genius. I was very privileged to have the opportunity to work with him. We worked together for quite a while before It Ain’t Half Hot Mum.
“I remember doing the (It Ain’t Half Hot Mum) pilot and he’d say ‘just play it as we rehearsed it. If it dies on its arse it’s my fault and Jimmy’s (Perry)’.
“All actors get an idea and say ‘can I try this, can I try that’. He’d say ‘it’s very funny but save it for panto’.”
Hayes added: “He was a joy to work with. He was an actors’ director. He was someone you could talk to and who inspired you.
“He based his writing on truth. He had a great innings and was very successful at everything he touched. Dad’s Army is always on, somewhere in the world.”
Croft and Perry’s home guard comedy, set in the fictional seaside town of Walmington-On-Sea, ran for 80 episodes over nine years from 1968 to 1977, spawning a full length feature film, a radio series and a stage show.
The show, whose cast included Arthur Lowe as pompous bank manager Captain Mainwaring, and Ian Lavender’s put-upon Private Pike, attracted millions of viewers and is still regularly repeated.
Sherlock co-writer Mark Gatiss paid tribute on Twitter, saying: “Flags at half mast in Walmington-On-Sea tonight. Farewell to the great David Croft.”
Former head of comedy at the BBC Jon Plowman said: “David was quite simply a genius who invented a whole genre of comedy that was all his own - mostly from his own experience. He wrote so much of the great comedy from the last 30 or 40 years, always impeccably cast with an ensemble of great character actors.
“Yet he was also a great encourager of new comedy as well. The world is a less funny place for his going.”