RFID (radio frequency identification) tags play a crucial role in a wide range of applications, from wireless communications to personal tracking and smart city infrastructure. These tags come in various shapes and sizes, prompting the authors to review the specialized literature and focus on optimizing planar designs with different geometries. This study prioritizes reducing the size of the most commonly used tags while enhancing their reliability. The primary objective of this article is to understand and improve the performance of planar RFID tags operating at 13.56 MHz through numerical simulations based on structures generated by algorithms developed in MATLAB. Building on previous research, the methodology is validated, followed by a detailed description of the algorithm designed and implemented by the authors in MATLAB to identify all possible structures that meet the design criteria. The authors compared various analyzed structures, considering different inductor shapes, dielectric materials, and thicknesses while examining their effects on gain and resonant frequency. The study also provides thermal analysis of the structures, and experimental validation of the studied designs. Finally, the researchers conclude with recommendations on the optimal structure for RFID tags.