This paper investigates banks' corporate social responsibility. The credit market is composed of two sectors: one for standard and one for ethical projects. Since ethical banks are committed to investing in ethical projects, standard and ethical banks compete in the market for ethical projects. The latter have also a social profitability, but a lower expected revenue with respect to standard ones. If their expected revenue is not too low, ethical projects are undertaken by motivated borrowers. The latter obtain a benefit (a social responsibility premium) from accomplishing ethical projects in general and a premium for successful interaction when trading with ethical banks in the case the project is successful. If the expected profitability of ethical projects is sufficiently close to that of standard ones and/or the premium for successful interaction of motivated borrowers is sufficiently high, ethical banks are active, both sectors of the credit market exist and the whole market is fully segmented. This result holds true irrespective of the information structure: only moral hazard on the borrower side, moral hazard and screening on the borrower side. The optimal contract in our set-up is always a debt contract. However, its precise form and welfare properties depend on the information structure.