Compartments in food webs are subgroups of taxa in which many strong interactions occur within the subgroups and few weak interactions occur between the subgroups. Theoretically, compartments increase the stability in networks, such as food webs. Compartments have been difficult to detect in empirical food webs because of incompatible approaches or insufficient methodological rigour. Here we show that a method for detecting compartments from the social networking science identified significant compartments in three of five complex, empirical food webs. Detection of compartments was influenced by food web resolution, such as interactions with weights. Because the method identifies compartmental boundaries in which interactions are concentrated, it is compatible with the definition of compartments. The method is rigorous because it maximizes an explicit function, identifies the number of non-overlapping compartments, assigns membership to compartments, and tests the statistical significance of the results. A graphical presentation reveals systemic relationships and taxa-specific positions as structured by compartments. From this graphic, we explore two scenarios of disturbance to develop a hypothesis for testing how compartmentalized interactions increase stability in food webs.