This study aims to numerically investigate the thermal performance of porous square pin-fin heat sinks, considering three different configurations: inline, staggered, and 45° inline. Six different nanofluids, comprising CuO, Al2O3, and TiO2 nanoparticles dispersed in water and water–ethylene glycol mixtures at two volume fractions (φ = 0.5 % and 2 %), are employed as coolants. The impact of porosity on the thermal and fluidic behavior is also examined for the CuO–Water nanofluid (φ = 2 %) at porosity values of 40 %, 50 %, and 60 %. The commercial CFD code: Ansys Fluent 2020R1 is utilized for this numerical analysis and the results are compared to relevant experimental works for validation. The effects of heat sink geometry, nanofluid type, and porosity on heat transfer performance are systematically analyzed. The results show that the 45° inline configuration of the square pin-fin heat sink exhibits superior heat transfer enhancement compared to both the inline and staggered configurations. The use of nanofluids as coolants significantly improves the thermal performance compared to conventional fluids, with CuO–Water nanofluid demonstrating the most promising results. This comprehensive analysis provides valuable insights for the design optimization of high-performance cooling systems for electronic devices.