URL-encode JSON
Convert JSON to URL-encoding for use in query strings. Runs entirely in your browser, so your data never leaves your device.
0 chars · 0 lines
Output
The result appears here as you type.
How to use URL-encode JSON
- 1. Paste your JSON. Paste the JSON object or array you want to place inside a URL. Every character that a query string cannot hold safely will be percent-encoded.
- 2. See how percent-encoding works. Spaces become %20, quotes become %22, curly braces and colons get their own codes, all following the same rules as JavaScript's encodeURIComponent, so the result is safe to drop into a query string.
- 3. Copy the encoded string. Copy the percent-encoded text and append it as a query parameter value in a URL, such as ?data= followed by the encoded JSON, without any character breaking the link.
When to use URL-encode JSON
URL-encode JSON percent-encodes a JSON document so it can safely appear as a query string value. Characters like quotes, braces and spaces have special meaning in a URL, and this tool escapes them the same way encodeURIComponent does before a browser sends the request.
- Building a shareable link with embedded filters. You want a link that restores a specific view or filter state when opened, and the state is represented as a small JSON object passed in the query string.
- Constructing a manual API request URL. You are testing an endpoint that accepts a JSON parameter directly in the URL rather than the request body, and need it properly encoded before pasting it into a browser or curl command.
- Passing config to a redirect URL. An OAuth flow or webhook redirect needs to carry a JSON object as part of the callback URL's query string, and it has to be percent-encoded to survive the redirect.
- Debugging a query parameter in a browser address bar. You want to manually craft a URL with a JSON query parameter to reproduce a bug, and typing the raw JSON directly into the address bar would break the URL.
Examples
Encode an object for a query string
Input
{"q": "a b", "n": 1}Output
%7B%22q%22%3A%20%22a%20b%22%2C%20%22n%22%3A%201%7D
About the URL-encode JSON tool
URL-encode JSON is a free online tool that works entirely inside your web browser. Convert JSON to URL-encoding for use in query strings. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 90 JSON utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
There is nothing to configure. Provide the input and the result appears on its own. A worked example further down the page shows exactly what the tool produces for a real input.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.
Frequently asked questions
Does URL-encode JSON cost anything?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How much text can I process at once?
There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.