Two men have been winched to safety after their boat sank off the coast of Perth on Friday afternoon.

Emergency services responded to flares and an emergency distress beacon which were deployed about 1:00pm about three kilometres out to sea off Jindalee Beach, 40 kilometres north of Perth.

Several marine rescue vessels were called to the area, while the RAC Rescue helicopter was also deployed and winched two people from the water.

They were taken to Jandakot airport and transferred to Fiona Stanley Hospital for assessment.

The ages of the men and their condition were not known but they were not thought to be suffering serious injuries.

The men were aboard a recreational boat that sank about three kilometres off the coast.

The Australian Maritime Safety Authority (AMSA) said in a statement its officers contacted emergency contacts listed in the distress beacon's registration "who were able to provide valuable locational information for the boaties, as well as advice on safety equipment carried onboard".

It said the men's five-metre-long recreational boat sank.

Vessels from Marine Rescue Fremantle, Marine Rescue Whitfords, Water Police and the Department of Transport were among those who searched for the men, as well as a police aircraft.

AMSA said the incident was a timely reminder that registered distress beacons help save lives, and advises people to keep their contact details up-to-date.