The earthquake, which had a magnitude of 7.2, struck off the town of Pangandaran at 1519 local time (0819 GMT), causing a two-metre-high wave.
One resident, Teti, said high waves had destroyed hotels in Pangandaran and thrown boats onto the beach.
"Waves suddenly came and we ran to the hills," she told local radio.
"Many small hotels were destroyed," she said. "Boats have been thrown into hotels."
Over 300 people died and still there are many missing."
At least 2,000 people are also thought to have been displaced from the area.
A local official, Rudi Supriatna Bahro, said that thousands of people had sought refuge in mosques and other safe places.
"Many of the injured were suffering from broken bones," he told Indonesia's Metro TV.
Earlier, Indonesian President Susilo Bambang Yudhoyono said the search was still ongoing for the missing.
Mr Yudhoyono urged residents in coastal areas to move to safer places and said that rescue teams had been sent to the affected area.
Tremors from the earthquake were felt in the capital, Jakarta, for more than one minute, but there were no reports of damage or casualties there.
The Pacific Tsunami Warning Center in Hawaii had issued tsunami warnings for parts of Indonesia and Australia, and the Japan Meteorological Agency also warned of localised tsunamis.
Police in Australia's Christmas Island reported a 60 cm surge but no damage, Reuters news agency said, while India authorities issued a tsunami warning for the Andaman and Nicobar islands, which are located west of Indonesia.
But the Pacific Tsunami Warning Center said on its website that based on historical and current data, "a more widespread tsunami threat probably does not exist".
Earthquakes occur frequently in Indonesia, which sits on the seismically active so-called Pacific Rim of Fire.
On May 27, a magnitude 6.3 earthquake hit near the city of Yogyakarta in Java, killing more than 5,800 people.
More than 130,000 people were killed in Indonesia in the December 2004 Asian tsunami.Güncelleme Tarihi: 20 Eylül 2018, 18:16