# har-to-openapi

> TypeScript library and CLI that infers OpenAPI 3.0 or 3.1 documents from HAR captures of HTTP traffic, loosely based on har2openapi. Requests are grouped into one document per domain, with options to turn IDs in paths into parameters, infer query, form and JSON body schemas from observed values, and merge several captures into the same operations. Optional settings extract reusable component schemas, keep multiple redacted examples, mark fields required only when every sample contains them, attach per-field observation counts as evidence and apply an OpenAPI Overlay so hand-written names and corrections survive regeneration.

- Type: Tool
- Targets: Website
- Category: Website analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-19
- Added to the catalog: 2026-11-01
- Original resource: <https://github.com/jonluca/har-to-openapi>
- Primary source: <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/README.md>
- Catalog page: <https://awesomerea.org/resources/har-to-openapi/>
- Record JSON: <https://awesomerea.org/resources/har-to-openapi/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/har-to-openapi/index.md)

## Requirements & limits

- Reviewed at main commit 432e096 from 2026-09-07, tagged v3.0.1 and published to npm the same day; v3.0.0, released a day earlier, added capture merging, reusable schemas, overlays, redaction, reports and requiredness evidence. Node.js 22.19.0+ is required; it installs from npm as a library or runs as the har-to-openapi command. CI tests Node 24 and the latest Node on Linux, macOS and Windows.
- Input is one or more HAR files the user records, plus optional JSON or YAML configuration and overlay files. Without --multi-spec the CLI returns only the first domain's document. --validate and --strict check the result locally, and a conversion report lists counts and diagnostics for filtered entries, parse failures and schema fallbacks.
- The README states that observations describe finite captures and that a field present in every capture does not establish an API contract, so requirements should be confirmed with the API owner and recorded in an overlay. Endpoints, parameters and responses absent from the captures do not appear, and the default requiredness setting keeps the earlier legacy behavior.
- Generated documents copy captured values as examples unless examples are turned off or a redact list masks them; the README presents redaction as a step before sharing, and the reviewed commit closed further redaction gaps. Convert only traffic you are authorized to capture and analyze.
- MIT.

## Primary sources

1. <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/README.md>
2. <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/package.json>
3. <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/src/config.ts>
4. <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/.github/workflows/test.yml>
5. <https://github.com/jonluca/har-to-openapi/blob/432e096aa1d7814a39dcf772f40dc93cdd9c1620/LICENSE>
6. <https://github.com/jonluca/har-to-openapi/releases/tag/v3.0.1>
7. <https://github.com/jonluca/har-to-openapi/releases/tag/v3.0.0>
8. <https://www.npmjs.com/package/har-to-openapi/v/3.0.1>

## More in Websites

- [decode-js](https://awesomerea.org/resources/decode-js/index.md) · Tool
- [javascript-deobfuscator (LostMyCode)](https://awesomerea.org/resources/lostmycode-javascript-deobfuscator/index.md) · Tool
- [minusone](https://awesomerea.org/resources/minusone-script-deobfuscator/index.md) · Tool
- [JS-Deobfuscator (0x1Avram)](https://awesomerea.org/resources/0x1avram-js-deobfuscator/index.md) · Tool
- [HTTP Toolkit](https://awesomerea.org/resources/http-toolkit/index.md) · Tool
- [Javascript Deobfuscator](https://awesomerea.org/resources/willnode-deobfuscator/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
