The mortgage code is a set of standards defined by the Council of Mortgage Lenders, that lenders voluntarily subscribe to. It sets out codes of conduct on how a lender or intermediary should act when arranging your mortgage, as well as how you should be dealt with once your mortgage is in place. It also tells you how to complain in the event of a lender not keeping to the code and who to complain to.