How to export a HAR file in Safari
Export a HAR file in Safari: enable the Develop menu, record in Web Inspector's Network tab, click Export, and remove secrets before you share it.
To export a HAR file in Safari on a Mac, first turn on developer features (Safari, then Settings, then Advanced, then check Show features for web developers). Then press Option+Command+I to open Web Inspector, select the Network tab, check Preserve Log, reproduce the problem, and click Export or press Command+S. Safari saves the requests in the table as a .har file.
WebKit’s documentation does not mention any sanitizing for this export, so treat the file as containing everything: cookies, authorization headers, form data and responses. Before you share it, run it through the HAR sanitizer, which works in your browser and does not upload the file. The steps below follow Apple’s and WebKit’s documentation. Safari’s labels change between versions, so if a name differs slightly, pick the closest match.
Step 1: Turn on developer features
Safari hides its developer tools until you turn them on. You only need to do this once:
- With Safari active, choose Safari in the menu bar.
- Choose Settings… (or press Command+Comma).
- Open the Advanced pane.
- Check Show features for web developers.
A Develop menu now appears in the menu bar. Older Safari versions name this setting differently and still keep it in the Advanced pane; the wording there refers to showing the Develop menu.
Step 2: Open Web Inspector and select Network
Go to the page with the problem. Then open Web Inspector in one of these ways:
- Press Option+Command+I.
- Choose Show Web Inspector from the Develop menu.
- Right-click anywhere on the page and choose Inspect Element.
Click the Network tab. Its table lists every resource requested since Web Inspector was opened: documents, scripts, stylesheets, images, and API calls such as XHR, fetch and WebSocket. If you open Web Inspector after the problem happened, those requests are not there, which is why the next steps include a reload.
Step 3: Set up the recording
Above the table you will find a few controls:
- Preserve Log. Check it. Normally a navigation replaces the items in the table. With Preserve Log on, Safari keeps them, which matters for sign-in and checkout flows that redirect.
- Ignore cache. WebKit’s documentation describes a toggle that stops Safari from using cached resources while Web Inspector is open. Turn it on if the problem might come from a stale file. The setting stays on across Web Inspector sessions, so remember to turn it off later.
- Filters. You can filter by URL or by resource type. Leave them on “All” for the recording, so nothing is left out of the export.
Open Web Inspector right before you reproduce, rather than leaving it running while you browse, so the table holds little besides the problem.
Step 4: Reproduce the problem
Reload the page with Command+R if the issue happens while loading. Otherwise, perform the steps that trigger it. Wait until the error appears.
To see what failed, select a request in the table. Safari shows panes for it, including Headers (request and response headers, with any redirects), Preview (the response content), Cookies, Sizes, Timing and Security. You can show a Status column by right-clicking the table header. If the server sent an error message, note it in your bug report too.
Step 5: Export the HAR file
Click the Export button in the Network tab, or press Command+S. Safari asks where to save the file and writes it in HAR format. Give it a descriptive name, such as login-loop-safari-2026-11-10.har.
To check the export, click Import in the same tab or drag the file onto Web Inspector. Imported HAR files can be viewed one at a time. You can also open the file in the HAR viewer, which runs in any browser and does not upload anything.
Exporting from Safari on iPhone or iPad
Mobile Safari has no export button of its own, but a Mac can inspect it:
- On the iPhone or iPad, open the Settings app, go to Safari, scroll down to Advanced, and turn on Web Inspector.
- Make sure developer features are enabled in Safari on your Mac (step 1 above).
- Connect the device to the Mac with a cable, or set up wireless debugging in Xcode.
- On the device, open the page with the problem in Safari.
- On the Mac, open the Develop menu. The device appears as a submenu; choose the page from it. A Web Inspector window opens for that page.
- Use the Network tab as described above: Preserve Log, reproduce on the device, then Export.
Simulators that come with Xcode appear in the Develop menu the same way, which is handy if you do not have the physical device.
What’s in the file, and why to clean it
A HAR file is a JSON record of every request in the table: URLs, methods, headers, cookies, request bodies, status codes, response bodies and timings. Our explainer on what a HAR file is shows the structure.
Because Safari exports what it captured, the file can include:
- Session cookies that let someone act as you without a password.
Authorizationheaders with bearer tokens.- Tokens in URLs, such as OAuth codes or signed links.
- Anything you typed into forms while recording, including passwords.
- Personal data in API responses.
The HAR sanitizer removes authorization and cookie headers, headers named like token, secret, key or session, sensitive URL parameters, password, token and card fields in bodies, JWTs, known API key formats and card numbers. Emails and phone numbers are half-masked. It follows rules, so check the result in the HAR viewer, and add your own field names if your app uses unusual ones. See removing sensitive data from a HAR file for a checklist.
If a support team asked for the full, unsanitized file, send it only through their support channel and sign out of the app afterward. In most apps that ends the session, so the cookie in the file stops working.
Troubleshooting
There is no Develop menu. Developer features are off. Repeat step 1.
The Network table is empty. Web Inspector only lists requests made after it opened. Reload the page.
The failing request disappeared. A navigation replaced the table. Check Preserve Log and reproduce again.
The device is missing from the Develop menu. Check that Web Inspector is on in the device’s Safari settings, that the device is unlocked and connected, and that developer features are on in Safari on the Mac.
Reporting the same bug from Chrome
Midge, a free bug-reporting tool, covers Safari on a Mac: Midge for Mac comes with a Safari extension, so a recording of a Safari tab carries its console and network logs. It records your screen or takes a screenshot and attaches the technical details automatically. Every recording includes console logs, network requests, user actions and device info. Passwords, card numbers, tokens and cookies are redacted in your browser before anything leaves your device. When someone asks for a full HAR file, the export above is still the way to go.
Official documentation
The browser steps above were checked against these pages on November 10, 2026. Browser menus change between versions, so the official pages are the place to look if a label has moved.
- Apple Developer: Enabling features for web developers
- WebKit: Enabling Web Inspector
- WebKit: Web Inspector Network tab
- WebKit: Web Inspector keyboard shortcuts
Related guides
Frequently asked questions
Where is the HAR export in Safari?
In Web Inspector’s Network tab. Click the Export button in the tab’s toolbar or press Command+S, and Safari saves the requests in the table as a HAR file.
Can I get a HAR file from Safari on an iPhone?
Yes, with a Mac. Turn on Web Inspector in the iPhone’s Safari settings, connect the device, open the page, and choose the device from the Develop menu in Safari on the Mac. Then export from the Network tab.