The analysis of mechanical response and deformation-cracking behavior contributes to the high-efficiency extraction of geo-energy and long-term safety of underground engineering structures. Compared to natural cores, the mechanical properties of 3D-printed samples made from quartz sand as raw material are relatively homogeneous, and can be used for quantitative studies on the influence of natural defects on the mechanical properties of rocks. In this work, 3D-printed samples with single fractures of different crack angles, lengths and widths were fabricated and used for uniaxial compression tests. Adopting the digital image correlation method, the stress-strain distribution during uniaxial compression tests were visualized, and the influence of prefabricated fracture characteristics (dip angle, length, and width) on the deformation-failure process were studied. An extended finite element method subroutine for ABAQUS ® software was modeled and used for the uniaxial compression simulation, which was validated by experiments. Then, the influence of mechanical parameters (Young's modulus, Poisson's ratio, cohesion, and internal friction angle) on the deformation-cracking mechanics were simulated and studied. The results indicate that, compared to the intact sample, fractures reduce the sample strength. With the extension of fracture length and width, or the decline of fracture angle, both the peak strain and strength of the 3D-printed samples decrease. The splitting tensile failure, or shear failure, or both were determined for the 3D-printed samples with different fracture angles. For the same axial strain, the extension length of the new crack increases linearly with rising Young's modulus and decreases linearly with increasing Poisson's ratio. The initial strain of new cracks decreases linearly with increasing Young's modulus, while little variations are found in samples with different Poisson's ratio. For the same axial displacement load, the peak stress increases linearly with growing internal friction angle and cohesion.