More than 20 swimmers had to be pulled from the water at a Perth beach after a "flash rip" dragged people out to sea.

The swimmers, including some children, were rescued just south of the flagged swimming area on Scarborough Beach after they were caught in the fast-moving water on Thursday.

The City of Stirling's beach services coordinator, John Snook, said unsettled conditions up and down the coast together with a big swell had contributed to the rip.

"Scarborough Beach does experience a large number of rips and certainly can be quite dangerous for inexperienced swimmers," Mr Snook said.

"Mass rescues aren't everyday occurrences, they're not common, but by the same token they're not unknown either."

One beach inspector and six lifeguards carried out the rescues.

Mr Snook said none of the swimmers needed medical attention.

"For the most part they were okay, they were exhausted, they had been swept out to sea and obviously out of their depth," he said.

"Some were a little bit frightened, not hysterical but certainly concerned.

"It's something that all people should be aware of when they enter the ocean that rips can spring up without prior notice and people need to be prepared for that."