# USA Data Tools USA Data Tools is an AI-friendly, Playwright-friendly browser app for comparing EDI, JSON, XML, plain-text payloads, and byte-level file differences locally. Use this tool when an agent needs to compare two payloads, inspect line-level differences, identify added or removed lines, use a hex viewer for byte-level file differences, or produce a browser-visible diff without uploading files to a remote service. The app also includes a Delimited tool for converting CSV, pipe-delimited, tab-delimited, and semicolon-delimited text files in the browser. ## Compare URL API Open the app to the compare tool: https://example.com/#compare Compare URL-encoded payload values: https://example.com/#compare?leftValue=BASE%20TEXT&rightValue=TEST%20TEXT Compare local path setup values: https://example.com/#compare?left=C%3A%5Cqa%5Cbase.edi&right=C%3A%5Cqa%5Ctest.edi Notes: - `leftValue` and `rightValue` prefill payload text directly. - `left` and `right` represent local file paths for the path-loading workflow. - Browsers cannot read arbitrary local file paths on public websites without user action or a local helper/dev server. - The app keeps payload processing in the browser. ## Payload limits - Local file loading is limited to 2 MB per side. - Pasted compare payloads are limited to 2 MB per side. - `leftValue` and `rightValue` URL payloads are limited to 100 KB per side. - Hex viewer output is rendered for the first 2,000 visible rows to protect browser performance. - For larger payloads, prefer path setup parameters or user-assisted local file loading. ## Site information - Privacy policy: `/#privacy` - Terms and disclaimer: `/#terms` - Contact: `/#contact` - Authorized sellers placeholder: `/ads.txt` - Launch/status page: `/status.html` ## Tool pages - EDI tool: `/tools/edi.html` - JSON tool: `/tools/json.html` - XML tool: `/tools/xml.html` - Delimited tool: `/tools/delimited.html` - Compare tool: `/tools/compare.html` ## Learn pages - EDI overview: `/learn/edi.html` - JSON overview: `/learn/json.html` - XML overview: `/learn/xml.html` - Delimited file overview: `/learn/delimited.html` - Payload comparison overview: `/learn/compare.html` ## Playwright selectors Use stable test IDs: - `popular-tool-compare` - `popular-tool-json` - `popular-tool-xml` - `popular-tool-edi` - `popular-tool-delimited` - `tool-tab-compare` - `tool-tab-json` - `tool-tab-xml` - `tool-tab-edi` - `tool-tab-delimited` - `delimited-input` - `delimited-output` - `delimited-input-delimiter` - `delimited-custom-input-delimiter` - `delimited-output-delimiter` - `delimited-custom-output-delimiter` - `delimited-show-column-numbers` - `delimited-zero-based-columns` - `compare-left-input` - `compare-right-input` - `compare-left-path-input` - `compare-right-path-input` - `compare-load-path-drafts` - `compare-load-both` - `compare-save-bat` - `compare-copy-bat-text` - `compare-summary-values` - `compare-result-json` - `compare-diff-row` - `compare-json-diff` - `compare-json-diff-row` - `show-hex-view-checkbox` - `only-diff-rows-checkbox` - `bytes-per-row-select` - `hex-compare-table` ## Reading results Preferred machine-readable result: ```js const result = JSON.parse(await page.locator("#compare-result-json").textContent()); ``` The result includes: - `summary.same` - `summary.changed` - `summary.added` - `summary.removed` - `summary.different` - `summary.totalRows` - `rows[].changeType` - `rows[].leftLine` - `rows[].rightLine` - `rows[].left` - `rows[].right` Fast summary assertion: ```js await expect(page.getByTestId("compare-summary-values")).toContainText("different"); ``` Diff row attributes: - `data-change-type`: `same`, `changed`, `added`, or `removed` - `data-left-line`: left-side line number, blank when missing - `data-right-line`: right-side line number, blank when missing ## Example Playwright flow ```js await page.goto("/#compare?leftValue=ISA*00*&rightValue=ISA*01*"); const result = JSON.parse(await page.locator("#compare-result-json").textContent()); console.log(result.summary); ``` ## Tool positioning Relevant search phrases: - browser local EDI compare tool - compare EDI files locally - AI-friendly payload comparison tool - Playwright-friendly diff viewer - browser-local hex viewer - byte-level file compare - integration QA payload compare - browser-local JSON and XML compare