Convert a HAR (HTTP Archive) object to a cURL command using JavaScript.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Bump version in code May 23, 2013
Makefile Use component to build standalone browser version Apr 23, 2013
component.json Fix repository field and bump to 0.4.1 May 23, 2013
package.json npm: Fix the license field and add node_modules to .gitignore Jan 3, 2016


Written in JavaScript. CommonJS format. Inspired by a Python implementation.

💬 Try the web interface.


You'll need Component and GNU make to build the standalone browser version. Then run:

git clone
cd har-to-curl/
ls -l build/

Alternatively, use Component to install to your project.

component install har-to-curl

You can also use Bower.

bower install har-to-curl

And npm.

npm install har-to-curl


var harToCurl = require('har-to-curl');

var myHarString = '{"startedDateTime": "2013-02-21T16:23:17.806Z", "time": 577, "request": { "method": "GET", "url": "http://...';
var myCurlCommand;

// Passing in an object:
var myHarObject = JSON.parse(myHarString);
myCurlCommand = harToCurl(myHarObject);

// Passing in a string - will be JSON.parsed automatically:
myCurlCommand = harToCurl(myHarString);


Copyright © 2012 Matthew Caruana Galizia, licensed under an MIT license.