Calcareous algae in limestones of the Permian Chihsia Formation near Nanjing, China, are preferentially replaced by quartz. Replacement postdates both cementation by sparry calcite and also neomorphic alteration of the original skeletons to sparry calcite. It is thus diagenetically relatively late. The original replacement silica could have been massive opal CT, opal CT lepispheres, or quartz. Lepisphere-like bodies occur in a few specimens. Megaquartz rims represent later overgrowths on the silicified skeletons. Although the original ultrastructure of the algal skeletons is not preserved, the preferential silicification allows fine details of the skeletal morphology of the algae to be observed and the distribution of silica indicates the style of replacement which has probably occurred. In some specimens it is possible that dissolution of the skeleton was followed by void-filling by silica, including the possibility of lepisphere formation. But in other cases in situ replacement, probably by massive opal CT or quartz, is reflected by the replacement of the outer parts of calcite crystals by silica. This process produces a network of silica, and as it proceeds the calcite centres of the grains become progressively smaller until silica replacement is complete. Sponge spicules may have provided the most important silica source for replacement. It is proposed that water-insoluble organic films surrounding matrix grains, and now preserved as bituminous material, protected the matrix from replacement thus promoting selective late diagenetic silicification of these fossils.