ProductCompareToolsPricingBlog
Sign inCreate an account
  1. Tools

HAR to OpenAPI

Upload or paste a .har file from your browser's Network tab. You get a first draft of an OpenAPI 3.0.3 spec built from the requests in it. The file is read in your browser and never uploaded to us.

HAR file· 2 operations extracted
openapi: 3.0.3
info:
  title: Generated from HAR (api.example.com)
  version: 1.0.0
  description: Generated by Specway from a HAR capture. Review and edit before publishing.
servers:
  - url: https://api.example.com
paths:
  /v1/pets:
    get:
      operationId: getv1pets
      parameters:
        - name: limit
          in: query
          schema:
            type: string
        - name: Authorization
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
              example:
                - id: 1
                  name: Rex
    post:
      operationId: postv1pets
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
              example:
                id: 2
                name: Fido
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
            example:
              name: Fido

Capture a HAR file

  1. 1

    Open the Network tab

    In DevTools (F12, or Cmd+Opt+I on a Mac). Turn on Preserve log if you will move between pages.
  2. 2

    Use the API

    Do the things you want documented, so their requests are recorded.
  3. 3

    Save it

    Right-click the request list and choose Save all as HAR. Firefox and Safari have the same option.
  4. 4

    Load it here

    Upload the .har file or paste its contents above.

What the draft contains

Operations
Requests are grouped by host, path and method. Each group becomes one operation with a generated operationId.
Path parameters
Numeric segments become {id}, UUIDs become {uuid}, and long token-like segments become {token}. /users/42 and /users/43 collapse into /users/{id}.
Schemas and examples
JSON request and response bodies are turned into schemas, with the captured body as the example. One response is kept per status code.
Parameters and server
Query names and most request headers become string parameters. servers is set from the first host.

What you still have to do

The draft cannot tell required fields from optional ones, does not know whether an Authorization header is Bearer, Basic or something else, and has no summaries or descriptions. Rename the path parameters, add components.securitySchemes, mark required fields and write the descriptions.

A HAR file can contain cookies and tokens. Remove them from the spec before you share it.

You have a spec now. Publish it.

Clean up the generated file, then give it to Specway. It builds a docs site with a playground and code samples. Free for one API: create an account.

A page per endpoint
Parameters, request body and responses read from the spec, grouped by tag in the sidebar.
Playground
Fill in the parameters and send a real request from the docs page.
llms.txt and mcp.json
Every docs site serves both, built from the same spec, so AI agents can read your API.

Questions

How do I generate an OpenAPI spec from a HAR file?+

Save the requests from your browser's Network tab as a HAR file, then upload or paste it above. The tool groups the requests into operations, infers schemas from the JSON bodies and writes an OpenAPI 3.0.3 document. Review it before you publish it.

How does it handle path parameters?+

Numeric segments become {id}, UUID segments {uuid}, and long base64-like segments {token}. So /users/42 and /users/43 become /users/{id}. Rename them to match your domain afterwards.

Are response schemas accurate?+

Types are inferred from the captured bodies: string, integer, number, boolean, array and object. Whether a field is required is not, because one capture cannot show which fields are sometimes missing. Treat the schemas as a starting point.

Should I use this for production specs?+

Use it to start one. Then add summaries and descriptions, mark required fields, add error responses and a security scheme, and remove anything sensitive from the examples.

Does it handle authentication?+

The Authorization header is kept as a header parameter. The tool does not create a security scheme, because the same header could carry a Bearer token, Basic credentials or a custom value. Add components.securitySchemes yourself.

Related tools

  • OpenAPI ValidatorCheck the generated spec.
  • OpenAPI LinterFind what the draft is missing.
  • OpenAPI ViewerList the operations it found.
  • cURL to CodeOne request as JS, Python or Go.

See your docs in a minute

Paste the link to your OpenAPI file. Free for one API, no card needed.

Get startedSee pricing

API reference docs from your OpenAPI file.

Product

  • How it works
  • Endpoint pages
  • Code samples
  • Spec sync
  • Spec changes
  • API versions
  • Changelog
  • Recipes
  • Docs assistant
  • Your domain and look
  • Insights
  • Private docs
  • Team SSO
  • Pricing

Compare

  • vs ReadMe
  • vs Mintlify
  • vs Redocly
  • vs Scalar
  • vs Swagger UI
  • Postman alternatives
  • All comparisons

Tools

  • OpenAPI validator
  • OpenAPI diff
  • Swagger 2 to OpenAPI 3
  • cURL to code
  • JWT decoder
  • YAML and JSON
  • llms.txt generator
  • All tools

Resources

  • Guides
  • OpenAPI errors
  • Glossary
  • Public APIs directory
  • Blog
  • Help
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact
  • Privacy
  • Terms

© 2026 Specway. Made in Utah by Modlific LLC.

GitHubXLinkedIn