PurposeThis study aimed to understand how the consumer–green brand relationship affects the behavior of consumers of e-commerce platforms for smallholder farmers; it did so by formulating and testing a framework based on social identity perspective.Design/methodology/approachStructural equation modeling was applied to data from 532 questionnaire responses.FindingsAll hypotheses were supported. Customers’ environmental consciousness, green brand consciousness and green brand self-expression strongly affect green consumption consciousness. The effect of environmental consciousness on green brand identification is stronger than that of environmental consciousness on green brand consciousness and that of green brand self-expression on green brand identification.Practical implicationsSuggestions for managing green brands on e-commerce platforms for smallholder farmers and references for strategizing are also provided.Originality/valueThis study accounts for a wide range of antecedents of green consumption consciousness based on a social identity perspective. This study is the first to elucidate how green consumption affects the e-commerce branding of green smallholder farmers.