A petrol station worker has been praised for taking action after a car caught fire near bowsers in northwest Sydney.

The sports car was destroyed and the McGraths Hill service station was badly damaged in Saturday night's blaze, but no one was hurt.

Police Chief Inspector Garry Sims said the quick action of the attendant in activating the isolation switch prevented a potentially dangerous situation.

"I would like to reassure members of the public that the situation was bought under control quickly by emergency services," he said.

"An assessment has been made of the area and there has been no contamination to the local environment."

Firefighters were called to the petrol station at the intersection of Windsor and Pitt Town roads about 6.50pm, and were able to contain the blaze to the car and overhead awning before it could spread to the bowsers, fuel tanks or shop.

AAP