This paper presents heat transfer and friction characteristics, and the second law analysis of the convective heat transfer through a rectangular channel with square cross-sectional pinfins attached over a flat surface. Various clearance ratios (C/H) and interfin distance ratios (S-x/D) were used, and optimum pin-fin arrays that minimize entropy generation were determined. It was found that (Nu) over bar number based on the projected area decreased with increasing S-x/D and C/H, whereas (Nu) over bar based on the total heat transfer area increased with increasing S-x/D and with decreasing C/H. The friction factor was found to decrease with increasing S-x/D and C/H. Smaller entropy generation numbers were obtained at lower Reynolds number, higher clearance ratio, and higher interfin spacing ratio.