Solar-driven photocatalysis has attracted significant attention in water splitting, CO2 reduction and organic synthesis. The syntheses of valuable azo- and azoxyaromatic dyes via selective photoreduction of nitroaromatic compounds have been realised using supported plasmonic metal nanoparticles at elevated temperatures (≥90 °C); however, the high cost, low efficiency and poor selectivity of such catalyst systems at room temperature limit their application. Here we demonstrate that the inexpensive graphitic C3N4 is an efficient photocatalyst for selective syntheses of a series of azo- and azoxy-aromatic compounds from their corresponding nitroaromatics under either purple (410 nm) or blue light (450 nm) excitation. The high efficiency and high selectivity towards azo- and azoxy-aromatic compounds can be attributed to the weakly bound photogenerated surface adsorbed H-atoms and a favourable N-N coupling reaction. The results reveal financial and environmental potential of photocatalysis for mass production of valuable chemicals.