Efficient and compact grating coupler designs are crucial for enhancing the performance of photonic integrated chips. In this work, we propose a design approach that combines metalens technology and topology optimization. As a proof of concept, we first designed an on-chip metalens to preliminarily improve the transmission efficiency of a compact mode converter. Building upon this, we applied a topology optimization algorithm to further optimize the tapered conversion region, compensating for the insertion loss caused by local periodic approximations in the metalens design. This process ultimately improved the transmission efficiency to 93.69%. By integrating this with the previously designed grating coupler, we experimentally demonstrated that the mode converter, with a size of 20 × 12