A quick-thinking builder saved the life of a small girl who had collapsed outside an Australian supermarket when he picked her up and gave her mouth-to-mouth.

Rowan O'Neill rushed to help two-year-old Shaylar when her frantic mother, Anm Collard, took her into the shop in Perth and begged for help.

O'Neill turned the child upside down to prevent her choking and then gently slapped her back and undertook the Heimlich manoeuvre by squeezing her chest from behind to clear her airways.

Nothing got Shaylar breathing again so O'Neill began mouth-to-mouth resuscitation as worried shoppers stood by in the checkout lane.

It took 90 seconds before Shaylar came to and opened her eyes.

Her mum praised him for his quick actions.

"I thought she was going to die," she said. "I'm lucky that he was there."