A raver who died from a suspected drug overdose at a hardcore dance festival was found barely conscious by security and his friends were nowhere in sight.

Victorian man James Munro, 23, died after telling medical staff he ingested three pills he believed to be ecstasy, police said.

His death and at least 20 other drug overdoses occurred during the Defqon.1 Festival, held at the Sydney International Regatta Centre near Penrith on Saturday. Mr Munro had driven from Victoria to attend the dance festival with two friends, police said.

Intensive care paramedic Inspector John Brotherhood said Mr Munro, from Bayswater in Melbourne, did not have friends with him when he was brought to the medical tent.