This study looked at optimizing the geometrical shape of a simple T-mixer using Bernstein polynomials-based shape optimization technique to improve the mixing of the T-mixer. Passive micromixers of planar geometry are preferred in a wide range of applications such as lab-on-chips and chemical processing applications, due to their ease of fabrication and low processing costs. Studies conducted on T-mixers have revealed that the performance of T-mixers at low Re (<30) is dismal. At low Reynolds number flows, the mixing is completely dominated by diffusion because of laminar flow conditions. In the present work, an attempt to improve the mixing performance of the T-mixer was made and a nearly three-fold improvement in performance was reported. The adjoint-based shape optimization technique was employed to optimize the wall profile without losing the advantage of the ease of fabrication. The T-mixer boundaries were represented parametrically using Bernstein polynomials that could take any shape within a constrained plane. Different shapes can be generated for different polynomial orders. A limit on the minimum channel thickness (60 microns) was imposed, while the inlet and outlet boundary lengths were fixed. For this particular geometry, the 12th-order polynomial exhibits an optimized shape for maximum mixing performance. The optimized shape of the T-mixer also shows significant improvement in mixing compared to a conventional T-mixer with a reduced channel thickness of 60 microns.