HAR to cURL Converter

Convert HAR (HTTP Archive) files from browser DevTools to cURL commands. Reproduce network requests in your terminal for debugging and testing.

Options

HAR File Input

How to Convert HAR to cURL

  1. 1

    Export HAR from Browser DevTools

    Open Chrome, Firefox, or Edge DevTools (F12), navigate to the Network tab, and perform the actions you want to capture. Right-click in the request list and choose 'Save all as HAR with content' to download the complete HTTP archive file.
  2. 2

    Upload or Paste Your HAR File

    Click 'Upload HAR' to select the file from your computer, or paste the raw JSON content directly into the input panel. The converter accepts HAR 1.2 format files of any size.
  3. 3

    Configure Conversion Options

    Choose whether to include request headers, cookies, and whether to use long-form flags (--header vs -H). These options let you control the verbosity and readability of the generated cURL commands.
  4. 4

    Copy and Run the cURL Commands

    Click 'Convert' to generate cURL commands for every request in the HAR file. Use 'Copy All' to grab the full output, then paste directly into your terminal to replay the exact network requests outside the browser.

Common Use Cases

1

API Debugging and Troubleshooting

When a web application makes API calls that fail intermittently, exporting the HAR file and converting to cURL lets you isolate and replay the exact failing request from your terminal. This removes the browser from the equation so you can test headers, payloads, and authentication tokens independently.
2

Sharing Reproducible Bug Reports

Instead of describing a network issue in words, attach the converted cURL command to your bug report. Team members and support engineers can run the exact same request on their machines, making it far easier to reproduce and diagnose the problem.
3

Building Automation Scripts

Convert HAR entries to cURL commands as a starting point for shell scripts, CI/CD pipelines, or load testing setups. The generated commands serve as working templates that you can parameterize for different environments and test data.
4

Security and Penetration Testing

Security researchers export HAR files to capture authenticated requests, then convert them to cURL commands for manual testing outside the browser. This workflow is essential for testing authorization boundaries, CSRF protections, and session handling.

Why Convert HAR to cURL?

HAR files capture all network requests from your browser. Converting them to cURL lets you replay specific requests from the command line, share reproducible API calls, and debug issues outside the browser.

HAR (HTTP Archive) files are the standard format for recording network traffic in web browsers. Every major browser's DevTools can export HAR files, capturing request URLs, headers, cookies, POST bodies, response codes, and timing data. While HAR files are great for analysis, they are not directly executable. This converter transforms each entry in a HAR file into a ready-to-run cURL command that reproduces the original request from your terminal.

Developers use HAR-to-cURL conversion daily during API debugging, performance profiling, and collaboration. Instead of explaining a failing request in a support ticket, you can share a single cURL command that anyone can run. The converter handles GET, POST, PUT, DELETE, and PATCH methods, preserves custom headers and authentication tokens, and formats multipart form data correctly. If you need to go further, use the cURL to Code converter to turn those commands into Python, JavaScript, Go, or PHP code.

This tool processes everything in your browser. No HAR data is uploaded to any server, which is critical since HAR files frequently contain session cookies, API keys, and other sensitive information. For related workflows, try the Postman to cURL converter for Postman collections, or the JSON Formatter to inspect raw HAR file content before converting.

How It Compares

Browser DevTools let you right-click a single request and copy it as cURL, but that only works one request at a time and you lose the command as soon as you close the tab. HAR-to-cURL conversion processes an entire session of requests at once, preserving every API call, asset load, and redirect in executable form. This batch approach is significantly faster when you need to reproduce a multi-step workflow or debug a sequence of dependent requests.

Compared to paid API debugging tools like Postman or Insomnia, this converter requires no account, no installation, and no subscription. It runs entirely in your browser with zero data leaving your machine. For teams that need to quickly share network captures without setting up shared workspaces, HAR-to-cURL provides a lightweight, portable alternative that works with any terminal on any operating system.

Tips for Better Results

1
Filter requests in DevTools before exporting to keep your HAR file focused on the requests you actually need, rather than exporting hundreds of unrelated asset loads.
2
Use the 'Include Cookies' option carefully. Cookies may contain active session tokens that could be misused if shared. Strip them out before adding cURL commands to bug reports or documentation.
3
Enable 'Preserve log' in DevTools before recording so that page navigations and redirects are captured in the HAR file for a complete request timeline.
4
Combine this tool with the cURL to Code converter to go from browser request to production-ready code in Python, JavaScript, or any other language.
5
For large HAR files with hundreds of entries, look for specific requests by searching the output for domain names or URL paths rather than scrolling through every command.

FAQ

1

How do I export a HAR file?

In Chrome/Firefox DevTools, go to the Network tab, right-click on any request, and select 'Save all as HAR with content'. You can also use the export button in the Network tab toolbar.
2

Why are some headers skipped?

Certain headers like :method, :path, Host, and Content-Length are automatically set by cURL based on the request. Including them would cause errors or duplicates.
3

Can I convert a single request?

Yes, you can export a single request as HAR from DevTools. Alternatively, use browser extensions that let you copy requests directly as cURL commands.
4

Is my HAR data safe when using this tool?

Yes. All processing happens entirely in your browser using client-side JavaScript. No HAR data, cookies, or headers are uploaded to any server. This is especially important since HAR files often contain session tokens and authentication credentials.
5

What HAR format versions are supported?

The converter supports HAR 1.2, which is the current standard used by all major browsers including Chrome, Firefox, Edge, and Safari. Older HAR 1.1 files are also compatible.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool