Abstract To understand the deformation and fracture behavior of rock, it is useful to observe the variation of cracks in rock, and characterize the crack pattern as well as deduce a constitutive model. In this study, the development of microcracks on the surface of rock specimens under increasing stress is monitored under direct SEM observation. The initiation, extension and coalescence of cracks are photographed and then analyzed. The Box fractal dimension of cracks and its variation with stress level for a small unit of specimen is determined. Based on the test results, a fractal damage constitutive relation for the deformation and brittle fracture of rock materials is proposed. The damage variables are defined according to the fractal characteristics of microcracks and microcavities in rock media. The evolution equations for both isotropic and anisotropic damage variables are derived. Predictions of a uniaxial compression test on Fangshan marble are found to agree with the experimental results.