Up from 18 last year, supplier relationship manager John Tweddle said it was a fantastic result for a borough whose entire greenspace would easily fit inside Battersea Park.
The Green Flag awards have led to Westminster becoming only one of two London authorities – alongside Royal Parks – to be named a green borough.
Westminster cabinet minister for city management Cllr Ed Argar said: "We are very proud of our open spaces and put a tremendous amount of hard work into ensuring they meet high standards our residents, businesses and visitors expect from a world-class city.
"As one of the most populated boroughs in London with the additional pressures of a million visitors a day the limited open space we have is particularly precious.
"Our parks allow our residents and visitors to swap the hustle and bustle of the city for some peace, tranquilly and relaxation and winning this many Green Flags is an incredible achievement for Westminster."
Phil Barton, chief executive at Keep Britain Tidy said: "I would particularly like to congratulate Westminster who have worked hard throughout the year to keep their parks to a high standard and ensure they are pleasant and enjoyable spaces for the whole community."
Westminster's prize-winning green spaces include a tiny churchyard in the heart of the West End, a 19th century graveyard used as a burial site for prostitutes and paupers in Victoria and a state of the art sports ground in Paddington.
Marble Arch is also named in this year's winners list, following an extensive redevelopment last year to see its fountains restored and new lighting to put the famous Grade I West End landmark back on the map.
Another Green Flag winner, the Lillington and Longmoore housing estate, also known as "the hanging gardens of Pimlico", is the only social housing site in the country to scoop an award for its green space.
Manned by resident volunteers the gardens have been described as "an oasis of calm" just five minutes from Victoria Station.
Soho Square and Milbank Gardens are also newly recognised sites in Westminster. Communities and Local Government Minister Andrew Stunell visited Millbank Gardens on Tuesday (27th July) to see first hand an award-winning park.
The boroughs with the most Green Flags in London are: Westminster (21), Hillingdon (16) Haringey (16), City of London (15) and Hackney (12).