Pandemic COVID 19 and the digitalization era had changed consumer preference for food purchasing from offline to online. So, online food marketing was alternative food access in order to support food security. This research aimed to analyse the effect of customer behaviour in food online purchasing on customer perceptions of online food marketing of the existence of online food marketing for sustainable food security in Pekanbaru City using Structural Equation Modelling (SEM). SEM is a combination of factor analysis and multiple regression analysis, was used to explain the relationships between multiple variables. Using this, the indirect effect of indicators on each variable could also be investigated. The data used in this study were obtained through the purposive sampling of 100 customers who met the criteria of having shopped for food online at least twice, being of productive age (18-25 years), being married, and residing in Pekanbaru. Customer behaviour was measured by five indicators: Online Shopping Attitudes, Perceptions of Ease of Shopping, Quality of Service, Products, and Prices, whilst the perception was evaluated by three indicators: Food Availability, Food Access, and Food Utilization. With a 5% significance level, it could be concluded that the Perceptions of the Ease of Shopping, Products, and Prices have an impact on customer perception.