* Main CPI to rise in August, but still to be low - ministry

* Q3 main CPI seen at 1% y/y

* Ministry keeps 2021 main inflation forecast at 0.7-1.7%

BANGKOK, Aug 5 (Reuters) - Thailand's headline consumer price index (CPI) in July rose a smaller-than-expected 0.45% from a year earlier, weighed down by government subsidies on utilities to cushion the impact of a prolonged COVID-19 outbreak, the commerce ministry said.

The figure compared with a forecast for a rise of 0.97% in a Reuters poll and followed June's 1.25% increase.

Without the subsidies, which will end in August, the headline CPI would have risen 1.8%, ministry official Wichanun Niwatjinda told a briefing on Thursday.

The CPI index in August is expected to rise but not markedly due to the subsidies and with oil prices now below earlier levels, he said.

The ministry is maintaining its forecast for headline inflation in a range of 0.7-1.7% this year, with inflation seen at 1.01% in the third quarter and 1.9% in the fourth quarter, Wichanun said.

"But if there are additional or continuous government measures, the numbers will drop," he added.

The central bank has set a target for headline inflation in a range of 1-3%.

The government is expected to continue providing subsidies along with relief measures as the Southeast Asian country struggles with its biggest wave of infections.

In July, the core CPI index was up 0.14% from a year earlier, versus a forecast for a 0.26% rise.

In the January-July period, headline CPI rose 0.83% from a year earlier, with the core CPI up 0.26%. (Reporting by Orathai Sriring, Kitiphong Thaichareon and Satawasin Staporncharnchai Editing by Ed Davies)