Which one is better among the two, It depends upon how careful you are with your card and why you are using the card or what type of purchase you are doing with your card.
The features that make debit cards convenient – instant access to your money, lack of a required PIN number and not having to drag out your photo ID when you use it – make fraud that much easier. Unless reported quickly, theft of your debit card can quickly hack your bank account.
Whereas, Credit card companies hold on to strict liability laws. In addition to stricter liability laws, credit cards offer more consumer protection on purchases made.
One pitfall for many debit card consumers is not keeping up with their debit transactions.
So, we can say that during online purchases, credit cards are safer to use because of online purchase protection and till the end liability of credit card companies.