The synthesis of azo- and azoxy-aromatic dyes via photoreduction of nitroaromatics is hindered by high costs and low catalytic efficiencies and selectivities. Here the authors demonstrate the facile synthesis of these important dyes from their corresponding nitroaromatic precursors by using an inexpensive graphitic C3N4 photocatalyst.