NV ToolkitFormat · Validate · Convert

Encoding Tools

YAML URL Encode / Decode

YAML through URLs without corruption — validated, percent-encoded, and restored to clean formatting on decode.

In short

URL-encode YAML for query strings and webhooks — parsed and validated first. Decode mode restores clean, formatted YAML. Free, instant, private.

By NaveenKumar T · Updated

Learn: YAML Tutorial: Read and Write It Without Fear

  • Validates YAML before encoding
  • Decode restores formatted YAML
  • Exact error positions

Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →

Example

YAML URL Encode: input and output

A CI job fragment being handed to a web-based runner through a URL.

YAML
# deploy step
steps:
  - name: Build
    run: npm ci && npm run build
  - name: Notify
    env: {CHANNEL: "#releases", MSG: "déployé ✅"}
Percent-encoded
%23%20deploy%20step%0Asteps%3A%0A%20%20-%20name%3A%20Build%0A%20%20%20%20run%3A%20npm%20ci%20%26%26%20npm%20run%20build%0A%20%20-%20name%3A%20Notify%0A%20%20%20%20env%3A%20%7BCHANNEL%3A%20%22%23releases%22%2C%20MSG%3A%20%22d%C3%A9ploy%C3%A9%20%E2%9C%85%22%7D

Indentation survives as runs of %20 and line breaks as %0A; both # characters became %23 (the comment marker and the channel name alike), and the check-mark emoji expanded to three UTF-8 bytes, %E2%9C%85.

Learn more

Encoding whitespace-significant formats

YAML is the worst-case format for URL transport: indentation is structure, newlines are separators, and both are mangled by anything that treats the value as a simple string. Percent-encoding freezes every byte — the document that comes out of decode is exactly the one that went in, verified by a full parse on both ends.

Use it for passing pipeline snippets to web-based runners, embedding config in callback URLs, or shipping manifests through systems that only accept query parameters.

The copy-paste corruption this prevents

Every YAML user has lived the failure mode: a manifest pasted into a chat, a ticket, or a URL arrives with its indentation flattened, and the recipient burns twenty minutes on a parse error that didn't exist at the source. Percent-encoding is the armor — the encoded string survives chat clients, ticketing systems, URL shorteners, and email line-wrapping byte-for-byte, and the decode step on this page proves it parsed by actually parsing it.

For payloads too large for a URL, the Base64 to YAML sibling does the same validated round-trip with a denser encoding better suited to request bodies and config fields.

Help

Frequently asked questions

Everything you need to know about the YAML URL Encode.

01How do I use YAML URL Encode?

Paste YAML and Encode to produce a URL-safe value; Decode reverses it and re-formats the YAML. Parse errors are reported with line and column before anything is encoded.

02YAML depends on newlines and spaces — do they survive encoding?

Newlines survive URL-encoding as %0A and spaces as %20, and decode back byte-identically. That's the point of encoding YAML rather than pasting it raw — a URL would otherwise collapse the whitespace that IS the document's structure.

03Do comments, quotes and flow-style lists survive the round trip?

Encoding is byte-exact, so the encoded value carries them all. Decode is not: after percent-decoding it parses the YAML and re-emits it from the parsed value, which drops comments, removes quotes that are not needed, and rewrites flow lists like [a, b] in block style with one item per line. Key order is kept. A multi-document stream separated by --- is rejected by the parser, so encode one document at a time; an empty document is reported as such rather than encoded.

Keep working

Related tools

Learn the format

Related guides

All guides →