YAML URL Encoder — Free Online Tool

YAML URL Encoder

Paste YAML and get a URL-encoded string that can travel safely in a query parameter, a share link or a webhook URL. Encoding runs in your browser; nothing is uploaded.

How the encoding works

The tool applies JavaScript's encodeURIComponent() to the whole document:

  • Letters, digits and - _ . ! ~ * ' ( ) are left as they are.
  • Everything else becomes %XX escapes of its UTF-8 bytes: < is %3C, > is %3E, " is %22, = is %3D, & is %26, # is %23, a space is %20 and a line break is %0A.
  • Non-ASCII characters (é, ü, 中, emoji) become several escapes, one per UTF-8 byte.
  • Whitespace and line breaks are kept, encoded, so decoding gives back exactly the original text.

Because &, =, ?, / and # are all escaped, the result is safe to drop into a single query-string value: ?data=<encoded>.

Example

app:
  name: demo
  tags: [a, b]  # list

becomes

app%3A%0A%20%20name%3A%20demo%0A%20%20tags%3A%20%5Ba%2C%20b%5D%20%20%23%20list

The indentation survives as %20%20 and each line break as %0A. That matters for YAML, where indentation is structure — decoding restores the document exactly.

When you need it

  • Share links and playgrounds that load a YAML document from a ?config= parameter.
  • CI and webhook URLs that accept a small YAML payload.
  • Testing an endpoint that expects URL-encoded YAML in a form field (application/x-www-form-urlencoded).

Things to know

  • The YAML is not validated before encoding; check it with the YAML Validator.
  • Comments and blank lines are encoded too. Remove them to shorten the URL.
  • Keep secrets out of URLs. URLs end up in browser history, server logs and analytics — don't encode configuration that contains passwords or tokens.
  • Long documents may exceed URL length limits (often 2,000–8,000 characters); send them in a request body instead.