The competition watchdog said both banks had agreed to issue refunds to customers after breaches of unarranged overdraft rules.
HSBC will refund £8m to 115,000 customers who were not sent a text message when they entered an unarranged overdraft.
Santander broke the rules in six separate ways, and has said it will refund customers, but it first needs to work out who they are and how much they are owed.
Customers at both banks will get back all of the charges they incurred if they were not warned about them by text.
The Competition and Markets Authority has also ordered HSBC and Santander to undertake an independent check of their compliance with the rules.
The CMA said in a statement: “The refunds paid by the banks cover all fees incurred by customers from going into unarranged overdrafts where they had not been warned beforehand by the required text alerts.”
It said the two banks had started breaking the rules as soon as they came into force in February 2018.
Santander did not send text warnings about overdraft fees to customers who had previously signed up for email alerts. It also failed to sign up customers to alerts when they switched mobile phone numbers.
Among a number of failings, the lender also did not alert customers who went into an unarranged overdraft as a result of a direct debit from their account overnight.
HSBC failed to send alerts to some customers because it had a policy of not disturbing customers after 10.45pm.
As a result, customers who entered an unarranged overdraft after this time but before the next day were not told about it until they had already been charged fees.
Santander said: “We are very sorry that some customers in certain circumstances were not sent the required overdraft alerts. The introduction of these alerts is a move we welcomed and believe is a real support to customers.
“We have carried out a detailed review to understand why the errors happened and have taken steps to fix the issues. We are now working to identify and refund all affected customers as quickly as possible.”
HSBC said: “We appreciate how helpful these text messages can be. We apologise to those customers who, for different reasons, did not receive an alert.
“We will continue contacting customers who incurred overdraft charges as a result of these issues to apologise and provide a refund.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies