The game of chess is not suitable for this type of challenge, let's reinstate the noble tradition of Duel, with sword preferably... :D
who is the best player of all times Anand or Karpov?

The game of chess is not suitable for this type of challenge, let's reinstate the noble tradition of Duel, with sword preferably... :D

Anand, Karpov, Fischer, Alekhine, Capablanca, Karparov, Carlsen: they are all great players--the greatest in the world at one time or another
But that doesn't answer the OP's question.

If the players played in their primes comparisons are fair.
Anand lost to Karpov when Karpov had an unfair advantage and Anand had only a few days rest before the finals even then Anand only lost in the tie break. Since then Anand has always beaten Karpov.
Anand played Carlsen when Anand was over 50 and Carlsen was 20 years.
Kasparov beat Anand head to head, however, Kasparov was beaten easily by Kramnik and Kramnik was easily beaten by Anand.
So I think Fisher, Karpov, Kasparov, Anand, Carlsen are the top 5 of recent times.
Karpov and Kasparov had the benefit of the mammoth Soviet Chess organization. Fischer, Anand and Carslen are were all on their own. Each made chess popular in their countries.
Carlsen used Anand's trainer who defected to Carlsen quite unprofessional. Till Anand all learning from book.
@boltjg Little punk is scared.