187

I love the network debugger, that being said, what programs are out there that let me step forward and backward through multiple 'hars' so I can replay them? if the 'hars' are saved with content, can the replay handle that as well?

right now I just read through in textpad, but if I have to present any of my findings a nice 'har player' could greatly help non-technical folk.

DefyGravity
  • 5,681
  • 5
  • 32
  • 47

12 Answers12

120

There is an HAR Viewer developed by Jan Odvarko that you can use. You either use the online version at

Or download the source-code at https://github.com/janodvarko/harviewer.

EDIT: Chrome 62 DevTools include HAR import functionality. https://developers.google.com/web/updates/2017/08/devtools-release-notes#har-imports

Paul Grime
  • 14,970
  • 4
  • 36
  • 58
Nizar
  • 1,429
  • 1
  • 11
  • 10
  • 2
    FWIW this doesn't seem to handle the "content" when you use "Save as HAR with content". Other than that, it's a decent HAR viewer. – Doktor J Jul 14 '14 at 14:53
  • haven't gotten it to work yet on a 'save all as har' option from the chrome debugger. However, i'll keep checking back with it. – DefyGravity Jul 24 '14 at 13:45
  • just got it to work today from a pretty heavy website. nice application – DefyGravity Sep 08 '14 at 16:32
  • 29
    WARNING: As great as "online" HAR viewer sounds, I would be a bit concerned with what that server is doing with the HAR - is it saving it? Analyzing it? HAR may include sensitive personal data.. I personally wouldn't upload a HAR to somebody else's server.. now if it was sent to me by a client I suppose that would be different story.. oh wait, no it would not. – nothingisnecessary Nov 22 '17 at 16:19
  • 1
    @nothingisnecessary - HAR Viewer runs in the browser only, there is no server-side component that ever 'sees' the HAR file. – Paul Grime Jul 09 '18 at 14:21
  • Jon Odvarko's Harviewer was very easy to build from source (once you install NPM) - and IMHO it's the best way to view HARs. The built-in Chrome functionality only presents one of the views available in Harviewer. Plus, it requires that you run a proprietary browser. – Lambart Feb 18 '19 at 08:00
115
  1. Drag and drop:

Chrome Dev Tool's "Network" tool now allows you to import HAR files by drag-and-dropping into the window.

OR

  1. Use the Import Har button: import har file in chrome under network tab
David d C e Freitas
  • 7,481
  • 4
  • 58
  • 67
Xchai
  • 1,473
  • 1
  • 11
  • 10
  • To drag the HAR file into the network tab you most have the dev tools open on the same domain – ScottyG Nov 21 '17 at 22:48
  • Great idea, but with a caveat chrome doesn't seem to like date formats output from other tools (+1 from me anyhow) – Alex KeySmith Aug 14 '18 at 19:12
  • @ScottyG I just tried importing a .har file from another domain and it worked. Using version 73.0.3683.103 – Raul Pinto Apr 17 '19 at 09:28
  • @RaulPinto Thanks! Yes I think this is a new feature in v73 – ScottyG Apr 17 '19 at 20:59
  • 3
    This same thing works in Firefox, also regardless of what domain you're on. – Brady Dowling May 22 '19 at 13:17
  • 1
    There are now arrow icons to export and import HAR files. No more right clicking or drag/drop. – AndrewF Sep 24 '19 at 07:30
  • The import fails when using a file obtained by "Save all as HAR with content" from the Developer Tools, but works well with files created using "Copy all as HAR". Maybe it's a Chromium feature because it works well with Edge too. – Sandra Rossi Nov 09 '21 at 14:10
26

The Most Reliable way to replay har file is using a free tool like Fiddler, the tool is always free and can be downloaded quickly. The sites for the opening har file are all buggy and cannot open large files. Fiddler is available for all platforms.

https://www.telerik.com/download/fiddler

Go to File Menu -> Import Sessions...

Open Fiddler

Select the "HTTPArchive" Option

Select the Http Archieve option

Browse to your HAR file

enter image description here

The HAR file will open and replay on the fiddler window.

C B
  • 1,964
  • 14
  • 13
  • 1
    I found that exporting it as raw files and then loading the html file allowed me to replay console logs in any browser. – mikeytown2 Nov 29 '17 at 23:24
  • I like using fiddler because I can replay a particular request from the har file (changing tokens ofc) to see its effects. I personally have been using Fiddler for a long time and as this thread has been citing a lot of tools that all work in different cases, it finally falls down to personal comfort. – C B Nov 30 '17 at 00:32
  • I too liked this answer the most; For a very large HAR files, Fiddler allowed me to filter as well as delete excess messages (I also have been using Fiddler for quite some times so it felt most comfortable on its abilities including replay) – HidekiAI Oct 22 '19 at 16:14
  • Now, `Fiddler` is no longer free. – harshavmb Aug 07 '23 at 10:08
25

There are a couple of online, offline tools how to do this:

But the one that I liked the most, is a browser extension (tried it in chrome, hopefully it works in other browsers). After installation, it appears in your apps as HAR viewer. Then you can upload you HAR file and see something like this:

enter image description here

Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
23

Chrome now supports loading HAR files. Open Chrome, Press F12, Click on the Network Tab. Drag and drop the .har file DONE !

C B
  • 1,964
  • 14
  • 13
9

Drag and drop is best solution. I am just showing another way to import by clicking the HAR import icon: enter image description here

Barani r
  • 2,119
  • 1
  • 25
  • 24
8

Edit: Harhar is now open source. I have updated the URL below.

If you use an Avalanche load generator, you can use Harhar to replay a HAR file at very high load: https://acastaner.github.io/harhar/

This tool handles the "content" you use when you "Save as HAR with content."

Astaar
  • 5,858
  • 8
  • 40
  • 57
  • 2
    I know some months have passed since the OP asked, but this one should be considered as the right answer, as the mentioned tool can really "play" a HAR file. Very nice suggestion, @Astaar. – Charles Roberto Canato Jul 07 '15 at 14:03
  • It's written entirely in C#. "Works on Windows and Linux (Mono)" – Trindaz Feb 11 '17 at 16:05
  • Aside from totally agreeing with Astaar and Charles, I've just found another one: https://github.com/Stuk/server-replay – quetzalcoatl Mar 01 '18 at 14:31
8
  1. Open Chrome & click F12
  2. Click Network
  3. Drag and drop the har file in the chrome network tab.

enter image description here

S Krishna
  • 1,255
  • 13
  • 9
7

If I am not late....

For Firefox, one can import the same har file from Network tab.Firefox Network tab with import HAR file

Sanjay Maurya
  • 343
  • 1
  • 3
  • 7
5

Open chrome browser. right click anywhere on a page > inspect elements > go to network tab > drag and drop the .har file You should see the logs.

Arjun Thakur
  • 351
  • 5
  • 13
  • Xchai Answer above https://stackoverflow.com/questions/16199002/how-do-i-view-replay-a-chrome-network-debugger-har-file-saved-with-content/47164935#47164935 has the same info – Michael Freidgeim Nov 14 '22 at 07:29
3

Hardiff.com is pretty useful tool. It allows you to compare one or more .har files.

Zander
  • 2,471
  • 3
  • 31
  • 53
2

HAR import works seamlessly in Firefox: Open Web Developer -> Network Tab -> HAR -> Import ... (Top-right corner of web developer tool)

HAR Import Option