We generalize for the first time, to the best of our knowledge, the Dammann encoding method into non-separable two-dimensional (2D) structures for designing various pure-phase Dammann encoding gratings (DEGs). For examples, three types of non-separable 2D DEGs, including non-separable binary Dammann vortex gratings, non-separable binary distorted Dammann gratings, and non-separable continuous-phase cubic gratings, are designed theoretically and demonstrated experimentally. Correspondingly, it is shown that 2D square arrays of optical vortices with topological charges proportional to the diffraction orders, focus spots shifting along both transversal and axial directions with equal spacings, and Airy-like beams with controllable orientation for each beam, are generated in symmetry or asymmetry by these three DEGs, respectively. Also, it is shown that a more complex-shaped array of modulated beams could be achieved by this non-separable 2D Dammann encoding method, which will be a big challenge for those conventional separable 2D Dammann encoding gratings. Furthermore, the diffractive efficiency of the gratings can be improved around ∼10% when the non-separable structure is applied, compared with their conventional separable counterparts. Such improvement in the efficiency should be of high significance for some specific applications.