When is YAML URL-encoded?
Most often when a configuration UI passes a YAML snippet through a query parameter — preview pages, sandbox links, and "share this config" features. Webhook payloads that ship YAML as a form field, URL-based diff/blame URLs in GitOps tools, and IDE plugin deep links also encode YAML this way. The newline-heavy structure of YAML means you will see lots of %0A bytes in the encoded form.
Why do my newlines look like %0A in the input?
Percent-encoding represents a newline (LF, byte 0x0A) as %0A. YAML relies on newlines to separate keys at the same indent level, so a multi-line config almost always carries multiple %0A bytes. Decoding restores the newlines and your YAML is readable again.
Will the indentation survive the round-trip?
Yes. Each leading space in YAML encodes as %20. After decoding, those become real spaces and your indentation is byte-for-byte identical to the source. This matters for YAML where one missing space silently changes the document structure.
How does this handle + vs %20?
In strict RFC 3986 percent-encoding, %20 is the only spelling for a space. In application/x-www-form-urlencoded payloads, + is also a space. The tool replaces every + with %20 before decoding so form-encoded YAML round-trips correctly. If your input came from a strict source where + was intended literally, you would need to handle that separately in code.
Does this validate the decoded YAML?
No — only the percent-encoding is reversed. After decoding, paste the result into the YAML Validator to confirm the document is well-formed and indentation is consistent.
What about non-ASCII characters in keys or values?
decodeURIComponent reads consecutive %XX bytes as UTF-8. A key like description with the value "café" round-trips fine — %63%61%66%C3%A9 decodes back to café. CJK keys, accented Latin, and emoji in string values all survive the encode/decode cycle.
Should I decode an entire query string at once?
No. Identify the parameter that holds the YAML (often named yaml, config, manifest, or values), then copy only the value after the equals sign and before the next ampersand. Pasting key=value&… runs the literal "yaml=" through the decoder and gives a confusing result.
Is my YAML uploaded to a server?
No. decodeURIComponent runs in your browser. Kubernetes secrets, Docker Compose passwords, and Helm values containing tokens never leave the page. Verify in DevTools → Network — no request fires when you click Decode.