A truly green, solventless, and fast protocol for the quantitative preparation of biologically active xanthene derivatives with 10 mol% sulfonated graphitic carbon nitride (Sg─CN) as a heterogeneous acidic catalyst was developed. Excellent yields, low cost, solvent-free conditions, high catalytic activity, reusability of the catalyst, simple workup, and heterogeneous carbon-based catalyst make the present method particularly attractive from a green chemistry perspective.