# cURL Command to HAR Converter

Convert a cURL command into a portable HAR 1.2 request entry.

> Canonical page: https://elysiatools.com/en/tools/curl-to-har-converter

- **Category:** Development

- **Keywords:** curl, har, http archive, api, postman, insomnia

## Overview

Parses an offline cURL command into one HAR 1.2 log entry. Headers, cookies, basic auth, query parameters, raw data and multipart form values are represented without sending a network request. File references in cURL are recorded as filenames only; local file contents are never read.

## Inputs

- **cURL Command** (textarea): curl -X POST https://api.example.com/users -H 'Content-Type: application/json' -d '{"name":"Ada"}'
- **Include creator comment** (checkbox)

## When to use

- When you need to import a cURL command into API testing tools like Postman or Insomnia that accept HAR files.
- When you want to document or share an HTTP request structure in a standardized HTTP Archive (HAR) format without executing the request.
- When you need to safely parse sensitive cURL commands containing credentials or cookies into structured JSON logs without sending network traffic.

## How it works

- Paste your raw cURL command into the input text area.
- Toggle the option to include a creator comment in the output metadata if desired.
- The parser extracts the HTTP method, target URL, headers, query parameters, cookies, and request body offline.
- Copy the generated HAR 1.2 JSON log entry to use in your API clients or documentation.

## Use cases

- Generating HAR files to import complex cURL commands into API clients like Postman or Insomnia.
- Documenting API requests in a standardized HTTP Archive format for developer portals.
- Converting terminal-based cURL examples into structured JSON logs for debugging and archiving.

## Frequently asked questions

### Does this tool send my cURL request over the network?

No, the conversion is performed entirely offline. The tool parses the command syntax without executing any network requests.

### How are local file uploads in cURL commands handled?

File references (such as @file.txt) are recorded as filenames only. The tool does not read or upload your local file contents.

### Can I convert multiple cURL commands at once?

The converter parses one cURL command at a time into a single HAR 1.2 log entry.

### Are cookies and basic authentication headers preserved?

Yes, cookies, basic authentication, and custom headers are parsed and represented in the resulting HAR headers and cookies arrays.

### What version of HAR does this tool generate?

The tool generates standard HAR 1.2 formatted JSON log entries.

## Related tools

- [cURL to Go (net/http) Converter](https://elysiatools.com/en/tools/curl-to-go): Convert a cURL command into a Go net/http code snippet with http.NewRequest, headers, and body
- [cURL to JavaScript (axios) Converter](https://elysiatools.com/en/tools/curl-to-js-axios): Convert a cURL command into a JavaScript axios code snippet with config object, headers, and data
- [cURL to JavaScript (fetch) Converter](https://elysiatools.com/en/tools/curl-to-js-fetch): Convert a cURL command into a JavaScript fetch() code snippet with headers, body, and method
- [cURL to PHP (cURL) Converter](https://elysiatools.com/en/tools/curl-to-php): Convert a cURL command into a PHP cURL code snippet with curl_setopt, headers, and post fields
- [cURL to Python (requests) Converter](https://elysiatools.com/en/tools/curl-to-python): Convert a cURL command into a Python requests code snippet with headers, data, and method
- [API Contract Mutation Tester](https://elysiatools.com/en/tools/api-contract-mutation-tester): Mutate OpenAPI request fields into semantically risky variants and optionally send them to a real backend to check defensive validation coverage
- [HTTP Request Tester](https://elysiatools.com/en/tools/http-request-tester): A lightweight in-browser HTTP client (mini Postman): send GET/POST/PUT/DELETE requests with custom headers and body, inspect status, headers, timing, and formatted response — all from your browser
- [API Contract Stress Tester](https://elysiatools.com/en/tools/api-contract-stress-tester): Generate boundary-value test cases from an OpenAPI 3.x document and optionally send them to a real backend to spot contract mismatches

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [cURL API Request Conversion and Testing](https://elysiatools.com/en/hubs/curl-to-code-converter): Convert a cURL request into code or HAR, test it safely, and explain the HTTP status without losing headers, body, or auth context.
