Conjugated polyelectrolytes (CPEs) are polymers that consist of backbones with π-delocalized electronic structures and pendant substituents with ionic functionalities. Conjugated polyelectrolytes (CPEs) have attracted significant attention as active materials in polymer optoelectronic devices, such as polymer solar cells (PSCs), polymer light-emitting diodes (PLEDs) and organic thin film transistors (OTFT). Here we report a facile route to the preparation of CPEs which enables the density of the ionic groups to be easily modulated. A family of CPEs was readily prepared by an aromatic substitution reaction on a pre-formed polymer backbone, enabling the properties to be systematically investigated without the complication of varying molecular weight and dispersity. Such an approach allows the optical and electrical properties to be finely tuned. A similar approach to the preparation of conjugated zwitterionic polymers is also reported.