PurposeThis study explores green consumer behaviour among Generation Y (Gen Y) and Generation Z (Gen Z) in India, applying the Theory of Planned Behaviour (TPB) to assess how digital literacy and eco-friendly behaviour, alongside knowledge, attitude, subjective norms, and perceived behavioural control, shape purchase intentions in line with Sustainable Development Goal 12 (SDG 12).Design/methodology/approachThe research involved a survey of 680 randomly selected respondents from educational institutions across three northern Indian cities. Data collection was conducted using a structured questionnaire with items measured on a 5-point Likert scale. Statistical methods, including confirmatory factor analysis, were used to validate the measurement model, while descriptive statistics, reliability analysis, and regression analysis were employed to analyse the data.FindingsThe study uncovers differences between Gen Y and Gen Z regarding the factors influencing green product purchase intentions. Gen Y’s purchase intentions are shaped by attitude, digital literacy, eco-friendly behaviour, and perceived behavioural control, whereas Gen Z’s intentions are also affected by environmental knowledge and subjective norms.Research limitations/implicationsThis research provides significant insights into the factors determining green consumer behaviour among Gen Y and Gen Z in India, enriching the knowledge of sustainable consumption practices. It highlights the importance of digital literacy and eco-friendly behaviour in promoting green purchase intentions, and the differing roles of environmental knowledge and subjective norms across generational cohorts.Practical implicationsUnderstanding the drivers behind green product purchase intentions for Gen Y and Gen Z enables stakeholders to craft specific marketing strategies, educational programs, and policy initiatives that promote sustainable behaviours and mitigate environmental impacts.Social implicationsThe study’s findings have significant social implications, promoting sustainable lifestyles and behaviours among younger generations. By influencing peer groups and communities, and guiding the development of effective public campaigns and CSR initiatives, the study contributes to fostering a more informed and engaged citizenry that advocates for environmental sustainability.Originality/valueThe uniqueness of this study comes from its focus on the Indian youth demographic, the application of the TPB framework with additional variables, and its contribution to SDG 12, enhancing our comprehension of green consumer behaviour and supporting sustainability advancements in India and globally.