5 mars 2025

How to edit network responses with only chrome dev tools

This article is a guide to editing network responses using the chrome dev tools.

Here is a simple example app which displays some user cards retrieved from an API. 

Screenshot of an app fetching users from an example API. The full code is available at the sandbox link below

This is the API response for the contacts in the chrome dev tools network tab, which you can open by:

  • Right clicking on the page
  • Clicking inspect
  • Navigating to the network tab

Screenshot of the network tab in chrome dev tools showing the users API network response.

Let’s imagine our User object will have a new property added in the future – “extraInfo” which we want to display on the card if it exists. 

We can update the front end code to reflect the future changes:

Screenshot of our app using data not yet available in the network response. The full code is available at the sandbox link below

But we can also test the expected API response before it has been deployed by creating an override for our request to the users endpoint:

Right click the request -> override content:

Screenshot of a right click on the users network response, 'override content' is being clicked.

Next we select a folder to save the override response data in:

Screenshot of the chrome dev tools  asking where to save overrides
network chrome dev tools

Then we give DevTools access to the folder:

Network chrome dev tools displaying the overrides folder where edits to network responses can be saved

Now you can edit your request:

Screenshot of chrome dev tools in the overrides folder editing the users payload with the new data we want.

Lastly, refresh your page and the override will be returned rather than the real response:

Screenshot of the UI displaying the overridden data. The full code is available at the sandbox link below

Here in the network tab we can see the edited response has been returned and the new front end feature is displaying!

If you are interested in trying out editing a network responses with chrome dev tools, fork this sandbox and add your own data to the users network response!

More tech articles:
Using ChatGPT to practice for frontend live coding interviews