Encode a JSON filter or search definition so it can sit safely in a URL.
Loading the tool...
How to use JSON URL Encode
Paste your JSON.
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 JSON URL Encode
Single page apps keep their state in the address so a link can be shared. Search UIs pass filters as JSON in a query parameter, and some APIs take a JSON object in a GET request.
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 JSON is validated and minified before it is encoded, so the result is as short as possible.
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 JSON 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 JSON URL Decode tool, which reverses the encoding and the result is formatted as readable JSON.
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.