In this paper, we describe a systematic way of obtaining the exact generating functions for \(\overline{p}(2n)\) , \(\overline{p}(4n)\) (first proved by Fortin et al.), \(\overline{p}(8n)\) , \(\overline{p}(16n)\) , etc. where \(\overline{p}(n)\) denotes the number of overpartitions of n. We further establish several new infinite families of congruences modulo \(2^4\) and \(2^5\) for \(\overline{p}(n)\) . For example, we prove that for all \(n, \alpha , \beta \ge 0\) and primes \(p\ge 5\) , \(\begin{aligned} \overline{p}\left( 3^{4\alpha +1}p^{2\beta +1}\left( 24pn+24j+7p\right) \right)&\equiv 0\pmod {2^5} \end{aligned}\) and \(\begin{aligned} \overline{p}\left( 3^{2\alpha +1}(24n+23)\right)&\equiv 0\pmod {2^5}, \end{aligned}\) where \(\bigl (\frac{-6}{p}\bigr )=-1\) and \(1\le j\le p-1\) . The last congruence was proved by Xiong (Int J Number Theory 12:1195–1208, 2016) for modulo \(2^4\) .