Usually, stockbrokers do not offer the facility of closing Demat accounts online, but with HDFC securities, you can do so. Drop an email at dematclosures@hdfcbank.com. The mail should be sent through the mail id registered with HDFC Securities.