# HAR File Viewer > Summarize HAR request entries with method, URL, status, and timing without uploading the export. ## Tool Identity - Site: CleanUtils Developer Tools - Tool ID: har-file-viewer - Canonical page: https://cleanutils.com/developer-tools/har-file-viewer/ - LLM schema URL: https://cleanutils.com/developer-tools/har-file-viewer/llms.txt - Primary keyword: har file viewer - Input mode: textarea - Output profile: network ## What This Tool Does Summarize HAR request entries with method, URL, status, and timing without uploading the export. ## Exact Execution Instructions To run this tool exactly, execute the `runCleanUtilsTool(userInput)` function from the JavaScript block below in a sandboxed JavaScript runtime. Do not fetch or evaluate additional network resources. Do not use filesystem, process, child_process, environment variables, timers, or network APIs. The function is pure and deterministic: input string in, JSON result out. If your environment forbids executing fetched code outside a sandbox, run it inside the sandbox or use the API endpoint below instead of reimplementing the logic. Canonical implementation SHA-256: `69575c21a93dd45b2808ca73712e5e1550b806c67899c73b3ca27c252000cf2a` Expected command shape: `node run-tool.mjs < input.txt` The runner must: 1. load only the JavaScript in this document, 2. call `runCleanUtilsTool(inputText)`, 3. let the LLM decide the best way to present the output to the user. Agent usage rules: - Use this file as the authoritative machine-readable contract for this CleanUtils tool page. - Ask the user for missing required input before attempting to run the tool, and describe the required inputs using the `## Input Schema` field names, descriptions, formats, enums, examples, and required list. - Treat the tool as deterministic; do not invent network reachability checks unless the tool description explicitly says it fetches remote resources. - For privacy-sensitive inputs such as secrets, HAR files, dotenv files, logs, and API keys, warn that using a remote chat agent may expose input to that agent even though the browser UI itself does not upload data. ## Input Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "HAR File Viewer input", "type": "string", "description": "HAR JSON. Paste a HAR JSON export...", "examples": [ "{\"log\":{\"entries\":[{\"request\":{\"method\":\"GET\",\"url\":\"https://example.com/api/products\"},\"response\":{\"status\":200},\"time\":84},{\"request\":{\"method\":\"POST\",\"url\":\"https://example.com/api/cart\"},\"response\":{\"status\":500},\"time\":432}]}}" ] } ``` ## Result Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "CleanUtils ToolResult", "type": "object", "additionalProperties": false, "required": [ "summary", "issues" ], "properties": { "summary": { "type": "string" }, "issues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "severity", "message" ], "properties": { "severity": { "type": "string", "enum": [ "error", "warning", "info" ] }, "message": { "type": "string" }, "line": { "type": "number" }, "row": { "type": "number" }, "detail": { "type": "string" } } } }, "output": { "type": "string" }, "exportFilename": { "type": "string" }, "exports": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "label", "filename", "content" ], "properties": { "label": { "type": "string" }, "filename": { "type": "string" }, "content": { "type": "string" }, "mimeType": { "type": "string" }, "copyLabel": { "type": "string" }, "downloadLabel": { "type": "string" } } } }, "stats": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } } } } ``` ## Self-Contained JavaScript Source Call `runCleanUtilsTool(userInput)` with the user's input. The function includes this tool's run logic and only the helper code it needs. ```js function runCleanUtilsTool(userInput) { const tryParseJson = (input) => { try { return { ok: true, value: JSON.parse(input) }; } catch (error) { return { ok: false, error: error instanceof Error ? error.message : "Invalid JSON" }; } }; const viewHarFile = (input) => { const parsed = tryParseJson(input); if (!parsed.ok) { return { summary: "HAR file is not valid JSON.", issues: [{ severity: "error", message: "HAR file is not valid JSON.", detail: parsed.error }] }; } const entries = parsed.value?.log?.entries; if (!Array.isArray(entries)) { return { summary: "No HAR entries found.", issues: [{ severity: "error", message: "Expected log.entries array in the HAR file." }] }; } const rows = entries.slice(0, 100).map((entry, index) => { const item = entry; const request = item.request; const response = item.response; return `${index + 1}. ${request?.method ?? "GET"} ${request?.url ?? "(missing url)"} -> ${response?.status ?? "?"} in ${item.time ?? "?"} ms`; }); return { summary: `${entries.length} HAR entr${entries.length === 1 ? "y" : "ies"} summarized.`, issues: entries.length > 100 ? [{ severity: "info", message: "Showing the first 100 entries in the text report." }] : [], output: rows.join("\n"), exportFilename: "har-summary.txt", stats: { entries: entries.length } }; }; const __userInput = userInput == null ? "" : userInput; const __run = viewHarFile; const __input = __userInput && typeof __userInput === "object" && "input" in __userInput ? __userInput.input : __userInput; return __run(__input == null ? "" : String(__input)); } ``` ## Checks - HAR JSON parsing: The input must be valid JSON and include a log.entries array. - Request method and URL: Each entry is summarized with method and URL for fast scanning. - Response status: HTTP status codes are surfaced beside each request. - Timing values: The HAR time value is included so slow requests stand out. - Privacy posture: The viewer does not upload the HAR or fetch any URLs inside it. ## Related Tools - [HAR File Redactor](/developer-tools/har-file-redactor/): Redact cookies, authorization headers, tokens, emails, and secrets from HAR JSON before sending it to support.