Should I process a JSON in the frontend or Backend, which is faster?

I would suggest to perform this on the backend, some key reasons I would suggest this is:

  • Processing on mobile devices leads to massive battery drain
  • If your frontend is web, javascript will block while the processing is occurring (which could lead to bad experiences)
  • Server response can be cached to speed up response times and lower duplicate processing
  • Your backend language may be able to perform the task more optimally then the frontend device can

It's always better to process the data in backend itself.


Ideally if the file size is 15 mb it will be loaded to the browsers memory which will make it slow, I would suggest to do the operation in backend only.

You can also go through this link for reference. Difference Between python and Javascript and what to use

  1. One important aspect is that JavaScript is difficult to debug. You might notice that despite your code being error-free, the program won’t work (fail silently).