Optical nonlinearity depends on symmetry and symmetries vanish in the presence of defects. Vacancy defects in centrosymmetric crystals and thin films are a well-known source of even-order optical nonlinearity, e.g. causing second harmonic generation. The emerging ability to manipulate defects in two-dimensional materials and nanoparticles provides an opportunity for engineering of optical nonlinearity. Here, we demonstrate the effect of defects on the nonlinear optical response of two-dimensional dielectric nanoparticles. Using a toy model, where bound optical electrons of linear atoms are coupled by nonlinear Coulomb interactions, we model defect-induced nonlinearity. We find that defects at particle edges contribute strongly to even-order optical nonlinearity and that unique nonlinear signatures of different defect states could provide the smallest conceivable QR-codes and extremely high density optical data storage, in principle approaching 1 bit per atom.