We have recently reported in our previous work that one-dimensional dielectric grating can provide an open structure for Fabry–Perot mode excitation. The grating gaps allow the sample refractive index to fill up the grating spaces enabling the sample to perturb the Fabry–Perot mode resonant condition. Thus, the grating structure can be utilized as a refractive index sensor and provides convenient sample access from the open end of the grating with an enhanced figure of merit compared to the other thin-film technologies. Here, we demonstrate that 2D grating structures, such as rectangular pillars and circular pillars, can further enhance refractive index sensing performance. The refractive index theory for rectangular pillars and circular pillars are proposed and validated with rigorous coupled wave theory. An effective refractive index theory is proposed to simplify the 2D grating computation and accurately predict the Fabry–Perot mode positions. The 2D gratings have more grating space leading to a higher resonant condition perturbation and sensitivity. They also provide narrower Fabry–Perot mode reflectance dips leading to a 4.5 times figure of merit enhancement than the Fabry–Perot modes excited in the 1D grating. The performance comparison for thin-film technologies for refractive index sensing is also presented and discussed.