This question already has an answer here:
My family is travelling from Kabul to Sydney via Delhi airport with Air India all the way. We all have Afghani passports with Australian visas in them. We have a 19 hour layover in the Delhi airport. Do we need visas if we stay inside the airport and do not go outside?