The government of Indonesia has launched various programs to increase community resilience, but the effectiveness of these programs has yet to be discovered. Previous studies have found a relationship between social capital and improving community food security. However, only limited tracing of rural and urban typologies has been conducted, especially in Indonesia. Therefore, this study analyzes whether social capital improves food security in rural and urban communities in Indonesia. We use data from 10,301 rural and 13,946 urban individuals obtained by the Indonesian Family Life Survey 5 (IFLS5) and employ three variables—bonding, bridging, and community participation—to examine the effect of social capital on food security. The ordered probit regression analysis results show that bridging and community participation significantly increase food security in rural and urban communities. Meanwhile, bonding has no significant effect. We recommend the implementation of efforts to increase social capital, primarily bridging and community participation, in rural and urban areas in Indonesia.