Encode a YAML snippet so it can sit safely in a URL.
Loading the tool...
How to use YAML URL Encode
Paste your YAML.
If it has an error, you see where and can fix it first.
Copy the encoded string and put it after the parameter name, for example ?data=.
About YAML URL Encode
Some tools and playgrounds store a YAML configuration in the address so that a link reproduces exactly the same setup.
Braces, quotes, colons and spaces are all special in a URL, so the text has to be percent-encoded before it goes into a query string. The YAML is checked for syntax errors first, line breaks are kept and percent-encoded as %0A.
Frequently asked questions
How long can a URL be?
Browsers allow very long addresses, but servers and proxies often cut them at 2,000 to 8,000 characters. For anything larger, send the YAML in a request body instead.
Is it safe to put sensitive data in a URL?
No. URLs end up in browser history, server logs and referrer headers. Encoding is not encryption, so keep secrets out of the address.
How do I decode it again?
Use the YAML URL Decode tool, which reverses the encoding and the YAML text is shown with its line breaks restored.
Why is the output so much longer than the input?
Each special character becomes three characters, for example { turns into %7B. Structured text is full of special characters, so growth of 50 percent or more is normal.