According to The Jakarta Post, the Meteorology, Climatology and Geophysics Agency (BMKG) said the tremor hit Banten about 81 kilometres southwest of the provincial city of Lebak at a depth of 10 kilometres.
Reports say buildings shook and motorbike riders were thrown off by its force.
However, no tsunami warning was issued and there were no immediate reports of casualties or damage.
Last month, at least three persons had died and seven others were wounded after a 6.5 magnitude earthquake struck a holiday island popular with British tourists off the coast of Java in Indonesia. (ANI)