In this paper we give the notion of modularity of a theory and analyze some of its properties, especially for the case of action theories in reasoning about actions. We propose algorithms to check whether a given action theory is modular and that also make it modular, if needed. Completeness, correctness and termination results are demonstrated.