This paper presents a modular method for the mechanical error analysis of complex planar linkages. The topology of the linkage under investigation is decomposed into several class II Assur group kinematic chains (AGKCs) combined in a given sequence. Therefore, the mechanical error of the whole linkage can be analyzed by investigating the error propagations of adopted AGKCs in successive order. Because class II AGKCs are first served as modules, the mechanical error equations of these AGKCs in terms of each error in link lengths and joint variables can be pre-formulated and embedded in form of subroutines in any programmable language. Once the AGKCs constituting the linkage topology is identified, the corresponding subroutines are introduced to compute the error propagations in the linkage. Therefore, the presented modular approach can facilitate the analysis by concentrating on the topology decomposition instead of the algebraic derivation. Numerical examples are provided to illustrate the advantage and flexibility of the modular approach.