Of the 21,038 new cases, 173 are in prisons.
Meanwhile, 22,012 patients have recovered and been discharged over the past 24 hours.
Since the epidemic kicked off last year, Thailand has had 816,989 Covid-19 cases, 600,152 of whom have recovered, 210,042 are still in hospital and 6,795 have died.
Separately, another 364,685 people were given their first Covid-19 shot in the last 24 hours, 125,685 their second shot, and 56,474 their third shot, bringing the total Covid-19 vaccine doses administered in Thailand to 21,717,954.
According to Worldometer, as of 10am on Wednesday, confirmed cases globally had risen to 204.81 million, 183.93 million of whom have recovered, 16.55 million are active cases (100,803 in severe condition) and 4.33 million have died (up by 10,092).
Thailand ranks 35th on the global list of most cases, which is topped by the US with 36.89 million, followed by India with 32.03 million, Brazil with 20.21 million, Russia with 6.49 million and France 6.33 million.