We study the effect of a parallel magnetic field in a thin and small superconductor. The field suppresses superconductivity through Zeeman coupling while stabilizes the Fulde-Ferrell-Larkin-Ovchinnikov (FFLO) state at high fields before superconductivity is destroyed. When the spatial period of FFLO state is comparable to the size of the superconductor, there is a strong commensuration effect, which modifies the superconducting phase diagram. We investigate the FFLO state and the phase diagram in the presence of strong commensuration effect both for the $s$-wave and $d$-wave superconductors using the Bogoliubov de Gennes equation, Green function approach, and Ginzburg-Landau theory. We found that the superconducting phase diagram is strongly modulated. Interestingly, there is re-entrance of superconductivity upon increasing the magnetic field. The commensuration effect of the FFLO state can be used to detect the FFLO state in experiments.