HAR (HTTP Archive) files contain detailed network request data from your browser. Converting HAR to CSV allows developers, analysts, and performance engineers to analyze network traffic, debug API issues, and optimize load times using familiar spreadsheet tools.
What is a HAR File?
HAR is a JSON format that records all HTTP requests and responses made by a web browser, including:
- Request URLs and methods (GET, POST, etc.)
- Headers (including cookies and auth tokens)
- Response status codes and timings
- Content size and MIME types
- Performance metrics (DNS, SSL, wait time)
Common use cases:
- Web performance analysis
- API debugging and testing
- Security audits
- Load testing analysis
- Client support and troubleshooting
How to Generate a HAR File
Chrome/Edge (Chromium)
- Open DevTools (F12 or Cmd+Option+I)
- Go to Network tab
- Reload the page or perform actions
- Right-click anywhere in the request list
- Select "Save all as HAR with content"
Firefox
- Open Developer Tools (F12)
- Click Network tab
- Load the page
- Click the gear icon (βοΈ) β "Save All As HAR"
Safari
- Enable Develop menu: Preferences β Advanced β "Show Develop menu"
- Develop β Show Web Inspector β Network
- Click Export icon
Why Convert HAR to CSV?
While HAR files are comprehensive, they're difficult to analyze without specialized tools. CSV conversion makes network data accessible:
| Task | HAR (JSON) | CSV (Excel/Sheets) |
|---|---|---|
| Filter slow requests | β Complex JSON parsing | β Sort by duration column |
| Find failed requests | β Manual searching | β Filter status != 200 |
| Calculate total size | β Requires scripting | β SUM() formula |
| Share with team | β οΈ Requires dev knowledge | β Universal format |
| Create reports | β Complex | β Pivot tables, charts |
What Data Gets Exported
A typical HAR to CSV conversion includes these columns:
Core Request Data
- URL: Full request path
- Method: GET, POST, PUT, DELETE, etc.
- Status: HTTP response code (200, 404, 500...)
- Status Text: OK, Not Found, Internal Server Error
- Type: MIME type (image/png, application/json)
Size & Performance
- Size: Response body size (bytes)
- Transfer: Actual transferred (with compression)
- Time: Total request duration (ms)
- DNS: DNS lookup time
- Connect: TCP connection time
- SSL: TLS handshake time
- Send: Request send time
- Wait: Server processing time (TTFB)
- Receive: Response download time
Headers (Optional)
- Cookies: Request/response cookies (can be removed)
- User-Agent: Browser identification
- Content-Type: Response format
- Cache-Control: Caching directives
Security: Removing Sensitive Data
β οΈ HAR files often contain sensitive information:
- π΄ Session cookies (auth tokens)
- π΄ API keys in headers or URLs
- π΄ Personal data in POST bodies
- π΄ Bearer tokens (OAuth credentials)
Safe Export Options
Our HAR to CSV Converter includes privacy controls:
- Remove cookies: Strips
CookieandSet-Cookieheaders - Redact Authorization: Removes
Authorizationheaders - Hide POST data: Excludes request/response bodies
- Sanitize URLs: Removes query parameters (e.g.,
?api_key=...)
Manual sanitization (if needed):
- Open HAR in text editor
- Search and replace sensitive values
- Remove
"cookies"and"headers"arrays - Then convert to CSV
Analysis Use Cases
1. Find Performance Bottlenecks
Goal: Identify slowest requests
- Convert HAR to CSV
- Open in Excel/Sheets
- Sort by Time column (descending)
- Focus on top 10 slowest requests
What to look for:
- High Wait time: Slow server processing β optimize backend
- High Receive time: Large response β add compression
- High DNS time: DNS issues β use DNS prefetch
- High SSL time: Certificate issues β check SSL config
2. Debug Failed Requests
Goal: Find all 4xx and 5xx errors
- Filter Status column
- Show only values β₯ 400
- Group by Status or URL
Common issues:
- 404: Missing resources (broken links, old cache)
- 403: CORS issues or auth failures
- 500/502/503: Server errors β check backend logs
3. Calculate Total Page Weight
In Google Sheets or Excel:
// Total transferred data
=SUM(E:E) / 1024 / 1024 β Result in MB
// Average request time
=AVERAGE(F:F) β Result in ms
// Count of each resource type
=COUNTIF(D:D, "image/png")
=COUNTIF(D:D, "application/javascript")
4. API Endpoint Analysis
Goal: Analyze API performance
- Filter URLs containing
/api/ - Group by endpoint (use
=LEFT(A2, FIND("?", A2)-1)to remove query params) - Calculate average time per endpoint
- Create chart showing slowest endpoints
Excel Analysis Tips
Pivot Table for Resource Summary
- Select your CSV data
- Insert β PivotTable
- Rows: Type (MIME type)
- Values: Count of URL, Sum of Size, Average of Time
Result: Summary showing count, total size, and average time per resource type (JS, CSS, images, etc.)
Conditional Formatting
- Highlight slow requests: Format cells β Color scale (red for >2000ms)
- Highlight errors: Formula:
=C2>=400β Red fill - Highlight large files: Formula:
=E2>1000000β Orange fill
Limitations of HAR Files
What HAR Doesn't Capture
- Client-side rendering: JavaScript execution time
- User interactions: Clicks, scrolls, form fills
- Memory usage: RAM consumption
- Browser caching logic: Why resources were/weren't cached
Complement HAR With:
- Lighthouse reports: Performance scores
- Chrome Performance tab: JS profiling
- Real User Monitoring (RUM): Actual user experience
Advanced: Scripting HAR Analysis
Python Script for Custom Analysis
import json
import csv
# Load HAR file
with open('network.har', 'r') as f:
har = json.load(f)
# Extract entries
entries = har['log']['entries']
# Convert to CSV
with open('output.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['URL', 'Status', 'Time', 'Size'])
for entry in entries:
url = entry['request']['url']
status = entry['response']['status']
time = entry['time']
size = entry['response']['bodySize']
writer.writerow([url, status, time, size])
print("Converted successfully!")
JavaScript/Node.js Example
const fs = require('fs');
const har = JSON.parse(fs.readFileSync('network.har', 'utf8'));
const rows = har.log.entries.map(entry => ({
url: entry.request.url,
method: entry.request.method,
status: entry.response.status,
time: entry.time,
size: entry.response.bodySize
}));
// Convert to CSV
const csv = [
'URL,Method,Status,Time,Size',
...rows.map(r => `"${r.url}",${r.method},${r.status},${r.time},${r.size}`)
].join('\n');
fs.writeFileSync('output.csv', csv);
FAQ: HAR to CSV Conversion
Can I edit a HAR file before converting?
Yes! HAR is plain JSONβopen in any text editor, remove sensitive data, then convert. Always sanitize production HAR files before sharing.
How large can HAR files get?
Complex web apps can generate 10-50MB HAR files (thousands of requests). Large HAR files may require scripting instead of online tools.
Does HAR include response bodies?
Only if you select "Save as HAR with content" in Chrome. Standard HAR includes headers and metadata but not full responses (to keep file size manageable).
Can I merge multiple HAR files?
Yes, using scripts. Extract the entries array from each HAR, combine them, then convert to CSV. Useful for comparing different sessions or tests.
What's the difference between "Size" and "Transfer"?
Size: Uncompressed response size. Transfer: Actual bytes sent (with gzip/brotli compression). Transfer is smaller if compression is enabled.
Related Tools
- JSON to CSV β Convert API responses
- ICS to CSV (2026): Convert Calendar to Excel - Convert calendar events to spreadsheet format
- SQL to JSON (2026): Parse INSERT Statements - Transform structured database data
- VCF to CSV for Gmail (2026): Import Contacts - Another practical CSV conversion guide
- CSV to JSON β Reverse conversion
- XML to CSV β Other data formats
Related Articles
Conclusion
Converting HAR to CSV unlocks powerful network analysis capabilities using familiar spreadsheet tools. Whether debugging slow page loads, analyzing API performance, or auditing security headers, CSV export makes complex network data accessible to developers, analysts, and stakeholders. Always sanitize HAR files before sharingβremove cookies, auth tokens, and sensitive headers. Use our HAR to CSV Converter for instant, privacy-safe conversion with customizable column selection.


