Load YAML Results via URL
Load Base64-encoded YAML or remote YAML files through result-page query parameters.
Compare YAML can open a comparison from base and contrast query parameters. Use remote-source links when the documents are already hosted, or Base64 when the link should contain both inputs. Parsing and comparison run in your browser.
Build a result URL
URL loading happens on the YAML result page. It resolves both parameters, validates the resulting YAML, and runs the comparison automatically.
https://comparejson.com/tools/compare-yaml/result?base=...&contrast=...
Always percent-encode each complete value with encodeURIComponent. Unencoded & or # in a signed remote URL can break query parsing, and Base64 padding or + characters also need encoding.
const url = `https://comparejson.com/tools/compare-yaml/result?base=${encodeURIComponent(baseValue)}&contrast=${encodeURIComponent(contrastValue)}`;
Both parameters are required. Base64 mode stores the encoded YAML itself in the URL. Remote URL mode stores source addresses, and your browser requests those sources. Neither mode creates a server-side snapshot.
Load remote YAML files
Pass publicly accessible HTTP/HTTPS URLs to base and contrast, percent-encoding each source address:
https://comparejson.com/tools/compare-yaml/result?base=https%3A%2F%2Fcomparejson.com%2Fexample_data%2Fdemo.base.yaml&contrast=https%3A%2F%2Fcomparejson.com%2Fexample_data%2Fdemo.contrast.yaml
Your browser fetches both sources directly. They must be reachable without browser-inaccessible authentication and allow the request through CORS. GitHub Gist page URLs are resolved to their raw content.
The response should contain YAML, typically served as YAML or plain text. A successful download does not guarantee valid input: YAML parser errors prevent the comparison. Check indentation, sequence dashes, quoting, and flow-style brackets when a source fails validation.
Embed YAML as Base64
Encode each YAML document as Base64, then apply encodeURIComponent to each encoded value. For example, these inputs:
name: base
replicas: 1
name: contrast
replicas: 2
produce this URL after Base64 and percent encoding:
https://comparejson.com/tools/compare-yaml/result?base=bmFtZTogYmFzZQpyZXBsaWNhczogMQo%3D&contrast=bmFtZTogY29udHJhc3QKcmVwbGljYXM6IDIK
You can optionally use the external base-64.com encoder or your own local tooling. It is only an encoding aid, not a privacy safeguard: Base64 is reversible, and any content you enter on an external site is subject to that site’s practices.
This mode is self-contained, but large documents can create URLs that browsers, chat tools, hosting platforms, or link shorteners cannot handle reliably. Prefer remote sources for large inputs, while still following the privacy guidance below.
Privacy and sharing
Base64-encoded data in a URL is sent with page requests and may be recorded in hosting service logs. Remote source addresses are also part of the URL, and importing from a URL sends a request to the source you specify. Do not place sensitive data in URLs, and share them only with people who should have access to the YAML or its source locations.
Using Share is different: it uploads the compared YAML to the share server and creates a share_id link to /tools/compare-yaml/result. Anyone with that link can load the stored snapshot until it expires.