PurposeThis study investigates the relationship between financial literacy, that is, financial knowledge and financial skills, and market discipline, with financial behavior as the mediating variable. The study uses data from Indonesian depositors in commercial banks to estimate the relationship between the variables.Design/methodology/approachThis study applied an explanatory method with a quantitative approach by surveying 343 Indonesian commercial bank depositors, in both public and private banks. The responses were collected using the purposive sampling technique. This study applied structural equation modeling (SEM) using AMOS software to analyze the data and then to estimate the relationships between financial literacy and market discipline.FindingsThis study shows that financial knowledge, financial skills, and financial behavior can improve market discipline. This study also provides empirical evidence that financial behavior has a mediation effect on the relationship between financial skills and financial knowledge to the market discipline.Research limitations/implicationsThe results show that all financial literacy latent variables have a significant positive effect on market discipline. Financial behavior has a mediation effect on the relationship of financial skills and financial knowledge with market discipline. Depositors with good knowledge of financial products and services, who are skillful in managing their money and who demonstrate good financial behavior can effectively discipline the market. They will punish imprudent banking by actions such as the withdrawal of their funds. Financial literacy significantly enhances market discipline.Practical implicationsThis study provides recommendations for regulators, practitioners, academics, and depositors, that is, the actors in the financial industry, on the need to empower consumers with financial literacy, while also promoting market discipline to recognize the importance of these two aspects for the sustainability of financial stability.Originality/valueThis study provides empirical evidence for the market discipline literature, using a behavioral approach, namely, the action of withdrawal of funds. The study then estimates the relationship between financial literacy, that is, financial knowledge and financial skills, and market discipline, with financial behavior as the mediating variable.