The safety and efficacy of ivermectin for the prevention and treatment of COVID-19 are still controversial topics. From August to November 2021, we conducted a double-blinded, randomized controlled trial at Siriraj Hospital, Thailand. Eligible participants were adults ≥ 18 years with suspected COVID-19 who underwent a SARS-CoV-2 RT-PCR test. After enrollment, the participants were randomized to receive either ivermectin (400–600 µg/kg/d) or placebo once daily for 3 days. Among 983 participants, 536 (54.5%) with a negative RT-PCR result were enrolled in the prevention study, and 447 (45.5%) with a positive RT-PCR result were enrolled in the treatment study. In the prevention study, the incidence of COVID-19 on Day 14 was similar between the ivermectin and the placebo group (4.7% vs. 5.2%; p = 0.844; Δ = −0.4%; 95% CI; −4.3–3.5%). In the treatment study, there was no significant difference between the ivermectin and placebo group for any Day 14 treatment outcome: proportion with oxygen desaturation (2.7% vs. 1.9%; p = 0.75), change in WHO score from baseline (1 [−5, 1] vs. 1 [−5, 1]; p = 0.50), and symptom resolution (76% vs. 82.2%; p = 0.13). The ivermectin group had a significantly higher proportion of transient blurred vision (5.6% vs. 0.6%; p < 0.001). Our study failed to demonstrate the efficacy of a 3-day once daily of ivermectin for the prevention and treatment of COVID-19. The given regimen of ivermectin should not be used for either prevention or treatment of COVID-19 in populations with a high rate of COVID-19 vaccination.