All tools

HAR to cURL Converter

Convert network HAR files into reproducible API requests: cURL, Python, Go, Java, PHP, Ruby. Clean headers, mask secrets, timeline, batch script, AI debug prompt. 100% client-side.

100% in-browserNo signupFree forever
Browser HAR → terminal-ready cURL

HAR to cURL Converter

Convert network HAR files into reproducible API requests. Paste or upload a HAR file; get clean cURL, multi-language code, timeline, and AI-ready debug prompts. Everything runs 100% client-side.

All processing happens locally. Your HAR file never leaves your device.

HAR input

or paste JSON below

Options

How to use

  • Chrome/Edge: DevTools → Network → Right-click → Save all as HAR with content
  • Firefox: Network tab → Right-click → Save All As HAR
  • Upload the .har file or paste its JSON above. Filter by domain/method/type, then select a request to get cURL or code in Python, Go, Java, PHP, Ruby, and more.

What Is a HAR File?

A HAR (HTTP Archive) file is a JSON-formatted log of every network request and response a browser makes during a session. When you open DevTools and record network activity, all of that data — URLs, methods, request headers, cookies, request bodies, response status codes, and precise timing — can be saved as a single .har file.

HAR is a universal standard supported by Chrome, Firefox, Safari, and Edge. It is the most complete snapshot of browser-to-server communication available, making it ideal for sharing reproducible bug reports, debugging authentication flows, auditing what a page actually transmits, and converting browser sessions into terminal commands or automation scripts.

How it works

Convert HAR to cURL in Under 60 Seconds

01

Open DevTools → Network tab

Press F12 in Chrome, Firefox, Safari, or Edge. Enable recording and trigger the page actions that produce the requests you want to capture.

02

Export your HAR file

Chrome/Edge: right-click the request list → "Save all as HAR with content". Firefox: right-click → "Save All As HAR". Safari: click the export icon in the Network toolbar.

03

Upload or paste the HAR

Drag and drop the .har file or paste the raw JSON into the converter. All parsing happens locally — nothing is uploaded to a server.

04

Filter, mask, and copy

Browse all extracted requests. Enable secret masking to redact auth tokens. Choose cURL, Python, Go, Java, PHP, or Ruby. Copy individual commands or export a batch shell script.

Comparison

HAR to cURL Converter vs Chrome's “Copy as cURL”

Chrome, Firefox, and Edge all have a built-in “Copy as cURL” option — right-click any request in the Network tab and it copies a single cURL command to your clipboard. It works well for one request. But it falls short the moment you need more:

One request at a time — DevTools “Copy as cURL” is a single-request operation. If you need to reproduce a flow involving 20 API calls, you have to right-click each one individually. This tool converts an entire HAR file — every request — in a single step.

No secret masking — DevTools copies your live Authorization header, session cookies, and API keys verbatim. This tool optionally replaces those values with [MASKED] placeholders so you can safely share the output in a bug report, Slack message, or AI prompt without leaking credentials.

cURL only — DevTools only outputs cURL. This tool also generates Python requests, Go net/http, Java OkHttp, PHP cURL, and Ruby Net::HTTP — useful when you want to turn a recorded browser interaction into production code.

No batch export — DevTools has no way to produce a shell script from multiple requests. This tool lets you select any subset of requests and export them as a single runnable .sh script for terminal replay or CI integration.

Use cases

When Developers Use HAR to cURL

🐛

Reproduce Bugs Without a Browser

Capture the exact failing request in a DevTools session and replay it from the terminal — no browser, UI, or login required. Attach the cURL to your bug report for instant reproducibility.

🤝

Share Reproducible API Calls

Send teammates a self-contained cURL command that exactly reproduces an issue. No environment setup, no credentials to share — just a command that works.

⚙️

Automate Requests in CI

Export a batch shell script from a HAR recording and run it in your CI pipeline to drive integration tests, smoke tests, or synthetic monitoring.

🔐

Debug Auth & OAuth Flows

Inspect the exact Authorization headers, PKCE codes, tokens, and cookies sent during a login or OAuth flow. Replay individual steps to pinpoint exactly where auth breaks.

🧪

Seed API Testing Tools

Generate cURL commands and import them into Postman, Insomnia, Bruno, or k6 as a starting point for test suites. Skip the manual "create request" step.

🔍

Reverse Engineer Third-Party APIs

Understand what requests a web app or SaaS tool makes so you can replicate the same calls in your own code — useful when an official API is missing or underdocumented.

How to Export a HAR File from Chrome, Firefox, Safari & Edge

All major browsers support HAR export from the Network panel in DevTools. Here is the exact sequence for each:

Chrome and Edge: Open DevTools with F12 (Windows/Linux) or Cmd+Option+I (Mac). Go to the Network tab. Make sure the recording button (red circle, top-left) is active. Reload the page or trigger the interactions you want to capture. Once requests appear, right-click anywhere in the request list and choose “Save all as HAR with content”. Upload the .har file here or paste its raw JSON.

Firefox: Open DevTools with F12. Click the Network tab. Trigger the requests, then right-click anywhere in the request list and select “Save All As HAR”. Use the downloaded file with this converter.

Safari: Enable the Develop menu under Settings → Advanced → Show Develop menu in menu bar. Open Develop → Show Web Inspector and click the Network tab. After recording, click the export button (down arrow icon) to save as HAR. You can also paste HAR JSON exported from Safari directly into this tool.

Note on sensitive data: HAR files typically contain live session cookies, Authorization tokens, and API keys in request headers. Before sharing a HAR file or the cURL commands it produces, use the Mask Secrets toggle to automatically redact those values. Your HAR never leaves your browser — all processing is client-side.

Privacy

Your HAR File Never Leaves Your Browser

HAR files are sensitive. They contain every header your browser sent, including Authorization: Bearer … tokens, Cookie headers with live session IDs, and potentially API keys passed as query parameters or custom headers. A leaked HAR file is effectively a credential dump.

This converter processes everything 100% client-side using JavaScript. There is no server, no upload endpoint, no analytics on the content of your HAR. The file you drag in stays in your browser tab. This makes it safe for enterprise, fintech, and healthcare environments where sending production request data to third-party services would violate data policies or compliance requirements.

For extra protection, enable secret masking before copying any output. This replaces the values of Authorization, Cookie, X-Api-Key, X-Auth-Token, and similar headers with [MASKED] — so the cURL command is safe to paste into a bug report, AI chat, or shared Slack channel without exposing live credentials.

FAQ

Frequently Asked Questions

1What is a HAR file?
A HAR (HTTP Archive) file is a JSON log of all network requests and responses recorded by a browser. It contains URLs, HTTP methods, headers, cookies, request bodies, response codes, and timing data — everything shown in the browser DevTools Network tab, saved to a portable file.
2How do I convert a HAR file to cURL?
Export a HAR file from your browser DevTools (Network tab → right-click → Save as HAR), then paste or upload it into this tool. The converter extracts every request and generates a ready-to-run cURL command for each one, preserving all headers, cookies, and request bodies.
3How do I export a HAR file from Chrome?
Open Chrome DevTools (F12 or Cmd+Option+I), go to the Network tab, record your requests, then right-click in the request list and choose "Save all as HAR with content". Upload the .har file or paste its JSON content here.
4What is the difference between this tool and Chrome's built-in "Copy as cURL"?
Chrome's "Copy as cURL" only works on one request at a time and always includes live credentials. This tool converts an entire HAR file (all requests) at once, supports secret masking, and also outputs Python, Go, Java, PHP, and Ruby — not just cURL.
5Can this tool convert HAR to Python, Go, or Java?
Yes. In addition to cURL, it converts HAR requests to Python (requests library), Go (net/http), Java (OkHttp), PHP (cURL), and Ruby (Net::HTTP). Select the target language from the output options for each request.
6Is my HAR file sent to a server when I use this tool?
No. All processing happens entirely in your browser using JavaScript. Your HAR file — which may contain auth tokens, session cookies, and API keys — never leaves your device. There is no backend receiving your data.
7How do I mask secrets and tokens in the output?
Enable the "Mask Secrets" toggle before converting. The tool automatically replaces Authorization header values, Cookie headers, and common API key header values with [MASKED] placeholders — making the output safe to share without exposing live credentials.
8What can I do with cURL commands extracted from a HAR?
You can replay requests in the terminal, share reproducible bug reports, run them in CI/CD pipelines, use them in Postman or k6, reverse engineer APIs, or convert them to Python or Go scripts for automation.
9How do I export a HAR file from Safari?
Enable the Develop menu (Safari → Settings → Advanced → "Show features for web developers"). Open Web Inspector (Cmd+Option+I), go to the Network tab, record requests, then click the Export button (down arrow icon) to save the .har file.
10How do I generate a bulk cURL shell script from a HAR file?
After converting your HAR, click "Export Shell Script" or "Download All as Script". This generates a .sh file with all cURL commands in sequence, properly escaped — ready to run in your terminal or use in a CI pipeline.
11Can I filter HAR requests by URL or HTTP method?
Yes. Use the filter bar to narrow results by URL pattern, HTTP method (GET, POST, etc.), or status code. Useful for a HAR with hundreds of requests when you only need the API calls (filter by /api/) or failed requests (filter by 4xx/5xx).
Learn more

Developer Guides

Feedback for har_to_curl

Tell us what's working, what's broken, or what you wish we built next — it directly shapes our roadmap.

You make the difference

Good feedback is gold — a rough edge you hit today could be smoother for everyone tomorrow.

  • Feature ideas often jump the queue when lots of you ask.
  • Bug reports with steps get fixed faster — paste URLs or examples if you can.
  • Name and email are optional; we won't use them for anything except replying if needed.

Stay Updated

Get the latest tool updates, new features, and developer tips delivered to your inbox.

What you'll get
  • Product updates & new tools
  • JSON, API & developer tips
  • Unsubscribe anytime — no hassle

Get in touch

Feature ideas, bugs, or a quick thanks — we read every message.