Thermoelectric generator (TEG) has been identified as a promising method for low-grade thermal energy recovery owing to their lack of moving parts, scalability, and compatibility with other devices generating waste heat. Heat exchanger, as one of the most important components of the modular TEG, plays a crucial role in improving the overall performance of the TEG. Nevertheless, flow maldistribution inside the heat exchanger results in uneven surface temperature field of the heat exchanger, which will ultimately limit the output capacity of the TEG. Achieving a homogeneous flow distribution within the heat exchanger while minimizing flow resistance is essential. To address this, optimization of a plate-shaped heat exchanger for the modular TEG is conducted using CFD analysis and the Taguchi method to identify the optimal combination of parameters. The optimized heat exchanger demonstrates a flow maldistribution intensity (ζ) of only 4.75 % and a low flow resistance of 1.16 kPa. Furthermore, a unit of the modular TEG is constructed using two optimized heat exchangers and commercial thermoelectric modules (TEMs), and its performance is analyzed via an analytical model. The results indicate that the power per module, net power density, and conversion efficiency reached 1.2 W, 51.4 kW/m3, and 1.92 %, respectively, at a temperature difference of 70 °C. These findings suggest that the optimized heat exchanger could provide high output performance compared with other literature, offering significant potential for low-grade heat energy recovery.