HAR to OpenAPI

Paste a HAR capture and get a draft OpenAPI 3.x spec — endpoints, methods, path/query params, and inferred request/response JSON schemas. Runs entirely in your browser; nothing is uploaded.

Try:
OpenAPI document

About this HAR to OpenAPI converter

This tool turns a HAR (HTTP Archive) capture — the network log your browser's DevTools can export — into a draft OpenAPI 3.x specification, entirely in your browser. Point it at the traffic an app or SPA actually made and get a starting openapi.yaml (or openapi.json) describing the endpoints it hit, without writing the spec by hand.

It reads log.entries, groups the requests by path and HTTP method, derives the servers base URL from the request origins, and infers a JSON Schema for each request body and for each response status code from the captured JSON. Id-like path segments are collapsed into {param} templates so /users/1 and /users/2 become a single /users/{user} operation.

How to capture a HAR

  1. Open your browser's DevTools → Network tab.
  2. Reload the page or click through the flows you want documented.
  3. Right-click any request → Save all as HAR (or use the download/export button).
  4. Paste the saved JSON into the box above.

What it infers

Options

The result is a deterministic best-effort draft meant as a head start, not a finished contract — review and edit it before publishing.

FAQ

Does my HAR get uploaded anywhere?

No. The conversion runs as WebAssembly inside your browser tab — the HAR you paste never leaves your machine, and there is no server, account, or network call involved.

Will this redact passwords, tokens, or cookies for me?

No — a HAR routinely contains secrets (auth headers, cookies, tokens, request bodies), and this tool does not strip them. If your capture is sensitive, run it through the har-redact tool first, then convert the cleaned HAR here.

How accurate is the generated spec?

It is a draft inferred purely from what the capture happened to show. A field only appears if it was present in a captured body, an endpoint only appears if it was called, and types are guessed from example values. Treat it as a scaffold to review and refine, not as a validated, authoritative contract.

Why did two different URLs collapse into one path?

With Parameterize id-like path segments on (the default), segments that look like ids — all-digit numbers, UUIDs, and long opaque tokens — are replaced with a {param} template, so /orders/1001 and /orders/1002 merge into /orders/{order}. Turn the option off to keep each literal URL as a separate path.

Does it detect authentication or security schemes?

No. Guessing securitySchemes from headers is noisy and easily wrong, so the tool deliberately skips it. Add your API's auth definitions by hand after generating the draft.

Can I get JSON instead of YAML, or a specific OpenAPI version?

Yes. Set Output format to JSON for openapi.json, and choose OpenAPI version 3.0.3 or 3.1.0. Both formats and versions describe the same inferred document.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool har-to-openapi '{ "log": { "entries": [ … ] } }'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/har-to-openapi/?har=%7B%20%22log%22%3A%20%7B%20%22entries%22%3A%20%5B%20%E2%80%A6%20%5D%20%7D%20%7D&format=yaml&openapi_version=3.0.3&parameterize_paths=true&infer_types=true&include_examples=true&domain=api.example.com&title=My%20API&drop_unsuccessful=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.