Reported herein is the synthesis of benzofused six-membered S-heterocycles by intramolecular dehydrogenative C-S coupling using a modular flow electrolysis cell. The continuous-flow electrosynthesis not only ensures efficient product formation, but also obviates the need for transition-metal catalysts, oxidizing reagents, and supporting electrolytes. Reaction scale-up is conveniently achieved through extended electrolysis without changing the reaction conditions and equipment.