YAML URL Encoder
Percent-encode YAML so it can be passed safely in a URL or query string.
Input
Output
Ready
Drop a file to load it
About this tool
Percent-encode a YAML document so every reserved character survives being placed in a URL.
When you would use it
- Passing YAML as a query parameter
- Building a deep link that carries data
- Encoding a value for a redirect
Worked example
id: 4815 name: Ada Lovelace active: true score: 91.5 roles: - admin - editor address: city: London postcode: NW1
id%3A%204815%0Aname%3A%20Ada%20Lovelace%0Aactive%3A%20true%0Ascore%3A%2091.5%0Aroles%3A%0A%20%20-%20admin%0A%20%20-%20editor%0Aaddress%3A%0A%20%20city%3A%20London%0A%20%20postcode%3A%20NW1
Things worth knowing
- Component mode escapes the reserved characters
&,=,?,/and#, which is what you need inside a query value. - Long documents make for unwieldy URLs — most servers and browsers stop somewhere around 2,000 to 8,000 characters. Base64 in a request body is usually the better choice.
Questions
Frequently asked
What is the difference between the encoding modes?
Component mode escapes reserved characters and is right for a single query value. URI mode leaves
/, ? and # intact so a whole URL stays usable. Form mode encodes spaces as + for application/x-www-form-urlencoded bodies.Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Related