The motivation to share members' knowledge is critical to an online community's survival and success. Previous research has established that knowledge sharing intentions are based on group cohesion. Several studies also suggested that social loafing behavior will seriously corrode group cohesion. Therefore, social loafing is a key obstacle to fostering online community development. Although substantial studies have been performed on the critical factors that affect social loafing in the learning group, those on online communities are still lacking. By integrating two perspectives, social capital and perceived risk, a richer understanding of social loafing behavior can be gained. In the research model, social ties and perceived risk have been driven by anonymity, offline activities, knowledge quality, and media richness. Social ties and perceived risk are hypothesized to affect social loafing in the online community, which, in turn, is hypothesized as negatively affecting group cohesion. Data collected from 323 online users in online communities provide support for the proposed model. The study shows that social loafing is a significant negative predictor of the users' group cohesion. The study also shows that social ties and perceived risk are important components of social loafing. Anonymity, offline activities, knowledge quality, and media richness all have strong effects on social ties and perceived risk in the online community. Implications for theory and practice and suggestions for future research are discussed. (C) 2010 Elsevier Ltd. All rights reserved.