In wireless sensor networks (WSNs), antennas play a crucial role in enlarging network capacity, prolonging transmission distances, fostering spatial reuse, and minimizing interference. This paper delineates a miniature rectangular patch antenna featuring partial grounding, meticulously engineered for the WLAN (wireless local area network) to promote real-time operations within WSNs. The main goal is to augment the creation and execution of a patch antenna that aligns with the typical size and power constraints of WSN nodes. The antenna is engineered and simulated for a 2.4 GHz WLAN frequency band (2.4 – 2.48 GHz) by leveraging CST Microwave Studio 2024. It is fabricated on a 45 mm × 50 mm FR4 substrate (εr = 4.3, thickness = 1.4 mm, loss tangent = 0.025). The antenna is energized via a 50 Ω microstrip inset-feed line. This antenna demonstrates a substantial bandwidth of 159.729 MHz (2.31963 GHz to 2.479359 GHz), an impressive return loss of – 48.15956 dB, a VSWR (voltage standing wave ratio) of 1.007848, a directivity of 4.7 dBi, a gain of 3.04 dBi, and an efficiency of 68.21%. These performance indicators illustrate the antenna’s effectiveness in enabling short-range communication within WSNs. With its compact design, broad bandwidth, and strong performance metrics, this antenna is an efficient and cost-effective solution suitable for various applications in WSNs, including industrial automation, environmental monitoring, healthcare, and smart city initiatives, ensuring reliable and high-quality wireless communication.