Small and medium enterprises (SMEs) in the food sector face increasing competitive pressure in the digital era. Yet, empirical evidence on how digital capability moderates the pathway from social media marketing and entrepreneurial orientation to firm performance remains limited. This study examines the influence of social media marketing and entrepreneurial orientation on competitive advantage and SME performance, with digital capability as a moderating variable. Drawing on Resource-Based View (RBV) and Dynamic Capability Theory, a quantitative cross-sectional survey was conducted among 250 food SME owners and managers in Madiun Residency, East Java, Indonesia. Data were analyzed using Partial Least Squares Structural Equation Modeling (PLS-SEM) via SmartPLS 4.0. The results indicate that social media marketing positively and significantly influences competitive advantage and SME performance. Entrepreneurial orientation positively and significantly influences competitive advantage (but does not directly and significantly influence SME performance, suggesting full mediation through competitive advantage. Digital capability significantly moderates the relationship between entrepreneurial orientation and competitive advantage but does not significantly moderate the relationship between social media mark eting and competitive advantage. Competitive advantage positively and significantly influences SME performance. These findings contribute to the literature by providing empirical evidence of the boundary conditions under which entrepreneurial orientation enhances competitive advantage in food SMEs, with digital capability as a key moderating condition. In practice, this study offers strategic insights for food SME owners and policymakers on leveraging digital resources to achieve sustainable competitive advantage.