Alexander Fraser's remains were found at the mouth of the River Nairn, close to the town's harbour in the Highlands.
Mr Fraser, 19, had gone swimming on Saturday evening after a dance music event ended early due to torrential rain.
One of his cousins had tried desperately to save him from the swollen river as the tide went out.
The relative was taken to hospital but later discharged, friends said.
The body was found shortly after 1pm as the tide receded. The alarm had been raised at 11pm the previous night following a report of a man in the water.
A police spokesman said: "On attending, officers found two males in the water, one attempting to assist the other. One managed to get out of the water but the other was lost from sight".
Police, coastguards, lifeboats from Invergordon and Moray, the Scottish Fire and Rescue Service, Scottish Ambulance Service and a helicopter from RAF Lossiemouth joined in the land and sea search.
The search resumed yesterday morning at 7am.
The beach party had been organised on social media and was billed as EDM-2014.
Organisers wrote that it would have included a DJ, marquee and was an attempt to "scale things up and go big for summer."
It urged participants to be on their best behaviour and transport was arranged, with a map of the beach published. About 60 youngsters attended, and there were reports yesterday of alcohol being consumed.
There were empty bottles of lager and cider lying near the site of the accident, a popular swimming spot on the East Beach side of the river.
Local youngsters often swim close to where a ladder reaches down to the water.
The body was found near the bottom of the ladder, just feet away from where Mr Fraser plunged in. It has yet to be formally identified.
Police cordoned off the harbour area as divers searched the water.
One local mother said: "I used to swim there myself when I was younger but I was a strong swimmer and even then you could feel the current trying to pull you down.
"When the tide is going out it is particularly dangerous but youngsters have always swum there and they like jumping in off the harbour wall.
"It's a tradition among the youngsters here. What a shame it has ended like this".
Mr Fraser's Facebook page said he most recently worked as a tyre fitter at and had studied in motor vehicle mechanics at Inverness College. It also stated he was a former pupil at Invergordon Academy.
His page shows him pictured with friends and lists his interests as football teams Celtic, Liverpool and Barcelona.
A report will be sent to the procurator-fiscal.