182

enter image description here

Network analysis by Chrome when page loads

I would like to export this data to Microsoft Excel so that I will have a list of similar data when loaded at different times. Loading a page one time doesn't really tell me much especially if I want to compare pages.

Flip
  • 6,233
  • 7
  • 46
  • 75
shebelaw
  • 3,992
  • 6
  • 35
  • 48
  • 2
    See also step by step: https://confluence.atlassian.com/kb/generating-har-files-and-analysing-web-requests-720420612.html – Vadzim Dec 06 '16 at 11:21

13 Answers13

116

if you right click on any of the rows you can export the item or the entire data set as HAR which appears to be a JSON format.

It shouldn't be terribly difficult to script up something to transform that to a csv if you really need it in excel, but if you're already scripting you might as well just use the script to ask your questions of the data.

If anyone knows how to drive the "load page, export data" part of the process from the command line I'd be quite interested in hearing how

The Trav
  • 1,955
  • 3
  • 22
  • 30
  • 14
    Surprisingly, chrome's network save to HAR saved ALL the data and not only the item – kishu Jun 17 '17 at 08:34
  • This does not appear to work with localhost sourced requests. – Skowronek Mar 29 '18 at 16:59
  • I highly recommend the tool `jq` (https://stedolan.github.io/jq/), a command line JSON processor. For example, you could extract the requested urls from a HAR json file with the command `cat har-log.json | jq '.log.entries[].request.url' -r` – Molomby Feb 18 '19 at 23:36
  • 1
    Chrome can now import a HAR file directly into the Network tab for analysis. – ElliotSchmelliot Dec 17 '19 at 20:33
  • HARs truncate at 100,000 bytes – thinkski Jul 28 '20 at 20:03
  • I used this tool https://hintdesk.github.io/networkhartocsv/input that I got from this answer: https://stackoverflow.com/questions/31648078/how-to-import-har-file-to-excel. It works very well. – Valladão Oct 06 '21 at 18:16
98

from Chrome 76, you have Import/Export buttons.

enter image description here

vanduc1102
  • 5,769
  • 1
  • 46
  • 43
  • 2
    This still just exports a HAR file, same as right-clicking. You still have to somehow process the JSON and extract the file you're after. – tylerl Jul 08 '21 at 15:08
31

I was trying to copy the size data measured from Chrome Network and stumbled on this post. I just found an easier way to "export" the data out to excel which is to copy the table and paste to excel.

The trick is click Control + A (select all) and once the entire table will be highlighted, paste it to Microsoft Excel. The only issue is if there are too many fields, not all rows are copied and you might have to copy and paste several times.

UPDATED: I found that copying the data only works when I turn off the filter options (the funnel-looking button above the table). – bendur

CalebC
  • 922
  • 11
  • 24
  • 8
    This is actually the easiest way. You can get around the "too many fields" problem by zooming the browser out (CTRL +/-). It doesn't matter if the text is too small to read, it will copy/paste into excel at normal size. – profexorgeek Apr 14 '15 at 14:13
  • 4
    did select all, but did copy only the visible files (in the scrollpane), I don't know why... :/ – The Student Jan 15 '16 at 13:37
  • 1
    you can play with columns if you right click on them so you can have more data than the default – Or Duan Oct 25 '16 at 07:37
  • 4
    I'm unable to get Ctrl-A to work, but I can use the mouse, start at a column towards the left, and highlight by clicking and dragging up. fyi, ymmv, tisla. – ruffin May 24 '17 at 16:29
  • @dubj, CalebC, why not just export as HAR and view at http://www.softwareishard.com/har/viewer/ – Pacerier Oct 11 '17 at 05:38
  • @ruffin, Yea, but still it doesn't have the content.. just the rows – Pacerier Oct 11 '17 at 05:39
  • 7
    @Pacerier I found that copying the data only works when I turn off the filter options (the funnel-looking button above the table). – bendur Nov 08 '17 at 22:48
  • calebc you should add @bendur's comment to your answer – CupawnTae Sep 04 '19 at 09:13
  • 1
    @CupawnTae Done, I'm surprised its almost 4-5 years ago I posted this answer – CalebC Sep 05 '19 at 11:29
  • and yet still very relevant :) – CupawnTae Sep 05 '19 at 15:13
27

Right-click and export as HAR, then view it using Jan Odvarko's HAR Viewer

This helps in visualising the already captured HAR logs.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Naga Kiran
  • 8,585
  • 5
  • 43
  • 53
10

In Chrome, in the Developer Tools, under Network, in the Name column, right-click and select "Save as HAR with content". Then open a new tab, go to https://toolbox.googleapps.com/apps/har_analyzer/ and open the saved HAR file.

lexma
  • 409
  • 5
  • 14
8

I came across the same problem, and found that easier way is to undock the developer tool's video to a separate window! (Using the right hand top corner toolbar button of developer tools window) and in the new window , simply say select all and copy and paste to excel!!

Preeti Joshi
  • 841
  • 1
  • 13
  • 20
6

Note that ≪Copy all as HAR≫ does not contain response body.

You can get response body via ≪Save as HAR with Content≫, but it breaks if you have any more than a trivial amount of logs (I tried once with only 8k requests and it doesn't work.) To solve this, you can script an output yourself using _request.contentData().

When there's too many logs, even _request.contentData() and ≪Copy response≫ would fail, hopefully they would fix this problem. Until then, inspecting any more than a trivial amount of network logs cannot be properly done with Chrome Network Inspector and its best to use another tool.

Pacerier
  • 86,231
  • 106
  • 366
  • 634
4

You can use fiddler web debugger to import the HAR and then it is very easy from their on... Ctrl+A (select all) then Ctrl+c (copy summary) then paste in excel and have fun

aviranh
  • 103
  • 1
  • 3
  • 1
    fiddler web debugger ?? – Pacerier Oct 11 '17 at 05:40
  • In [Fiddler Classic](https://www.telerik.com/fiddler/fiddler-classic) you can select "Import sessions" from the File menu, then select HTTPArchive as the import format to import the .har files. – Gary Hughes Mar 09 '22 at 13:19
4

I don't see an export or save as option.

I filtered out all the unwanted requests using -.css -.js -.woff then right clicked on one of the requests then Copy > Copy all as HAR

Then pasted the content into a text editor and saved it.

Kannan Ramamoorthy
  • 3,980
  • 9
  • 45
  • 63
  • 1
    I used this approach, it worked like charm. I want to add to the answer; the content when you paste in text editor is a json file. In fact I used powershell to parse the json and further study the request redirections (in my case). – Siva Senthil Nov 15 '19 at 11:35
1

I had same issue for which I came here. With some trials, I figured out for copying multiple pages of chrome data as in the question I zoomed out till I got all the data in one page, that is, without scroll, with very small font size. Now copy and paste that in excel which copies all the records and in normal font. This is good for few pages of data I think.

LearnAndShare
  • 45
  • 1
  • 9
1

In more modern versions of Chrome you can just drag a .har file into the network tab of Chrome Dev Tools to load it.

Grim...
  • 16,518
  • 7
  • 45
  • 61
0

To get this in excel or csv format- right click the folder and select "copy response"- paste to excel and use text to columns.

0

You can try use Haiphen, which is a chrome extension that allows you to analyze network traffic and what API calls a web application is making.