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.
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.
HAR input
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.
Convert HAR to cURL in Under 60 Seconds
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.
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.
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.
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.
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.
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.
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.
Frequently Asked Questions
1What is a HAR file?
2How do I convert a HAR file to cURL?
3How do I export a HAR file from Chrome?
4What is the difference between this tool and Chrome's built-in "Copy as cURL"?
5Can this tool convert HAR to Python, Go, or Java?
6Is my HAR file sent to a server when I use this tool?
7How do I mask secrets and tokens in the output?
8What can I do with cURL commands extracted from a HAR?
9How do I export a HAR file from Safari?
10How do I generate a bulk cURL shell script from a HAR file?
11Can I filter HAR requests by URL or HTTP method?
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.
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.
- Product updates & new tools
- JSON, API & developer tips
- Unsubscribe anytime — no hassle