HAR to JMX Converter: How to Turn a HAR File Into a JMeter Script

Platform

To convert a HAR file to JMX, record your user journey in the browser and save the network log as a HAR file, run it through a converter such as the open source har-to-jmeter-convertor (java -jar har-to-jmeter-convertor-10.0-jar-with-dependencies.jar -har_in myhar.har -jmx_out script_out.jmx), then open the generated script, a .jmx file, in Apache JMeter and fix what a conversion cannot know: dynamic values, think times and test data. If you only want to load test the recorded journey and do not need a JMeter script, you can also import the HAR file straight into PFLB Platform and run it as a load test. Both routes are below, with the limits of each. We checked the facts on 9 November 2026 against the documentation of each tool and link the sources.

What Are a HAR File and a JMX File?

The HAR (HTTP Archive) file format is a JSON log of one browser session: every request the browser sent to your web application, the response it got, headers, cookies, query string parameters and timings (Chrome DevTools docs).

A JMX file is an Apache JMeter test plan saved as XML. It holds the samplers that send requests, the timers, the cookie and cache managers, and the thread group that sets how many virtual users run the plan. A HAR file records what one browser did once. A JMX file describes a test that can run many times with many users. That is why you convert one to the other: the recording gives you the requests, JMeter gives you the load.

Step 1: Record the Journey and Save a HAR File

  1. Open the web application in Chrome and open DevTools on the Network panel.
  2. Check Preserve log, so the requests survive page loads (Chrome DevTools docs).
  3. Click through the journey you want to test, for example search, login and checkout, in a test environment and with a test account.
  4. Click Export HAR (sanitized), or turn on Allow to generate HAR with sensitive data in the Network settings and export with sensitive data.

By default, Chrome exports a sanitized log that leaves out the Cookie, Set-Cookie and Authorization headers. A HAR created with sensitive data keeps them, including real session cookies and tokens. Treat that file like a password: do not email it, and check where a converter sends your data before you upload it.

Step 2: Convert the HAR File to JMX

You have four ways to get from a HAR file to a JMX file. They differ in what the converter adds to the test plan. In the table, "record XML file" means the file that stores the recording: the exchanges written as if JMeter had captured them.

RouteHow it worksWhat the documentation says
har-to-jmeter-convertor (open source, Apache License)Command line tool for Windows and Linux. It tries to simulate a recording from the JMeter recording template: it reads a HAR file and writes a JMeter script and a record XML file of the recording that you can open in a View Results Tree listenerInclude and exclude filters (the regular expression matches the URLs), a pause setting that splits requests into new pages, partial recording by page and sampler number, Cookie Manager and Cache Manager added. Version 10.0 was released on 23 February 2026 (README)
BlazeMeter JMX Converter (online)You upload a HAR, Selenium, PCAP or JSON file in the browser and download a JMX filePer BlazeMeter's own documentation: no URL filtering, no URL numbering, no record XML file, no HTTP Request Defaults (host, scheme and port are hard coded in every sampler), no page splitting and an upload size limit (docs)
har2JMeter (open source)Java command line tool: har2JMeter -har file.har -jmx file.jmxSimple conversion with no filters. The repository was last updated in 2019 (GitHub)
JMeter's own recorder (no HAR file)Templates, then the JMeter recording template, then the HTTP(S) Test Script Recorder. The test script recorder runs a proxy, your browser sends its traffic through it, and JMeter writes the samplersPart of JMeter. You install the JMeter certificate in the browser for HTTPS (JMeter manual)

Which one to pick:

  • You want a script you will keep and edit. Use har-to-jmeter-convertor. Its filters let you drop static files and third-party calls at conversion time, and the record XML file keeps the original exchanges, so you can open them in the listener View Results Tree and find the values to extract when you add correlation.
  • The HAR holds nothing sensitive and you want no install. The BlazeMeter converter is quick. Plan to edit the hard coded hosts yourself.
  • You can repeat the journey. The JMeter recorder needs no conversion at all: the Recording template gives you a test plan with HTTP Request Defaults already in place.

Can You Convert a HAR File to JMX Online?

Yes. The BlazeMeter converter runs in the browser: choose the file, click Convert and download the JMX file. Read its limits first: it states that sensitive data contained in the HAR file may be transmitted to the BlazeMeter site. For a recording from a production session, convert on your own machine with a command line tool.

How Can You Convert a JSON File to JMX?

A HAR file is already JSON, so the HAR route above works. For other JSON, BlazeMeter says its converter does not accept arbitrary JSON: it takes JSON generated by the BlazeMeter Chrome extension or similar sources.

Step 3: Open the JMX File in JMeter and Fix What a Conversion Cannot

A converted script is a starting point, not a finished load test. Open the script created by the converter in JMeter and go through this list before you add virtual users.

  1. Check the hosts. If the converter hard coded the host, scheme and port into every sampler, move them into HTTP Request Defaults so you can point the test plan at another environment by editing one element.
  2. Remove what you are not testing. Static files, analytics calls and third-party scripts make up most of a HAR by request count. Filter statics at conversion time with -filter_exclude, a regular expression that matches the URLs to drop, such as (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2|svg), taken from the converter's README. The README also lists -remove_headers, which strips a comma separated list of headers.
  3. Check the cookie and cache handling. A test plan needs a Cookie Manager to keep a session between requests, and a Cache Manager if you want the browser's cache behavior. har-to-jmeter-convertor removes the recorded cookie and cache headers (-remove_cookie and -remove_cache_request are default true) because it adds those managers.
  4. Check the pauses. Real users stop between pages. With -add_pause on, the converter adds a Flow Control Action pause after each Transaction Controller, and -new_tc_pause sets the gap in the recording that starts a new page. Then check by hand: if every virtual user waits the same time, add a timer such as the Uniform Random Timer between page groups, and make sure the HTTP samplers are grouped into one Transaction Controller per page, so the report shows page times.
  5. Handle dynamic values. A HAR file replays what the server said once. Session tokens, CSRF tokens and generated order numbers from the recording will not be valid on the next run. Extract each value from the response that creates it with an extractor and use the variable in the later requests. This is correlation, and it is the step that decides whether the script tests anything.
  6. Add test data. One recorded user is one user. Use a CSV Data Set Config to give every virtual user its own login, search term or product.
  7. Add assertions. A request can return status 200 and still carry an error page. Add a response assertion so the test fails on wrong content, not only on a bad status code.
  8. Run it without the GUI. Use jmeter -n -t test.jmx -l test.jtl for the real run, with the output in the .jtl file, and the GUI only to build and debug the plan (JMeter best practices).

Skip the Conversion: Run the HAR File as a Load Test in PFLB Platform

Maybe you do not need a JMeter script at all. You need the recorded journey to run with many virtual users, from cloud load generators instead of your laptop. PFLB Platform imports a HAR file into a test, so the steps above shrink to the recording and an upload:

  1. In the platform, click + New Test. In the Import data pane, click HAR file.
  2. Upload the file. The file size must not exceed 100 MB.
  3. Optional: filter the hosts and the static resources whose requests go into the test. Select hosts with checkboxes, add a regular expression, or turn on the Include static resources toggle. Preview shows the result of the filter.
  4. Click Upload. The use cases, transactions and requests are added to the test (import docs).

You get an editable test without writing a script.

Sign Up

The imported test is where the rest of the work happens, and the docs for each step are short:

  • Dynamic values. Add an extractor (Regex, JSONPath, XPath or Boundary) to the request whose response holds the token, save it to a variable, and use the variable in the next requests (requests correlation).
  • Test data. Add literal and CSV parameters (parameters).
  • Assertions. Check the content of a response, not only its status code (assertions).
  • Load profile. Choose how virtual users are split between use cases, then a Stable test (duration, ramp-up time, number of VUsers, ramp-down time) or a Scalability test that raises the load step by step (create a test).
  • Pass or fail. Set an SLA on average response time, error rate, 95th percentile or requests per second for the test, a transaction or a request (SLA).
  • Results. Watch the run in Grafana dashboards and generate an AI report for a run (Grafana, reports).

If you already have a JMX file, the platform imports it too. The file size must not exceed 100 MB, and a script with an unsupported plugin is not imported (import from JMX).

Which Route Should You Use?

  • A JMeter script you will version and run in your own pipeline: convert the HAR file with a command line tool and finish the script in JMeter.
  • A quick check of one journey without installing JMeter: run the HAR file in PFLB Platform.
  • No HAR file, and you can repeat the journey: record it with the JMeter recorder. The Recording template gives you a test plan, with no conversion step.
  • Load that one machine cannot generate: import the HAR file or the finished JMX file into PFLB Platform and run it from cloud load generators.

If you would rather have engineers write the scripts, build the load model and run the tests, that is what our performance testing services do.

Contact Us

Sign Up