JSON URL Encode
Paste JSON and get a URL-safe encoded string ready to drop into a query parameter or form body. Validates the JSON first and offers minify-before-encode.
Last updated: May 27, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is JSON URL Encode?
Browsers and servers exchange data through URLs and form bodies, but URLs have restrictions on what characters they can contain. Characters like `{`, `"`, and spaces must be percent-encoded for the URL to remain valid. When you want to pass a JSON value through a query parameter — `?data=...` — you need to URL-encode it first.
This tool handles three encoding modes: `encodeURIComponent` (recommended for query values, encodes everything reserved), `encodeURI` (preserves URL-syntax characters like `/` and `?`), and form encoding (uses `+` for space, the standard for `application/x-www-form-urlencoded` POST bodies).
How to Use JSON URL Encode
Paste JSON into the input panel.
Pick an encoding mode (encodeURIComponent is the safe default for query parameters).
Toggle "Minify JSON before encoding" to strip whitespace and reduce URL length.
Copy the encoded output.
Common Use Cases
- Embedding a JSON payload in a query string (?filters=...).
- Building a form POST body containing a JSON value.
- Generating links to a debug or playground page that pre-fills a JSON input.
- Encoding JSON before passing it through a single-page-app URL fragment.
Example Input and Output
A small JSON object is minified and percent-encoded for a query string.
{"q":"hello world","page":1}%7B%22q%22%3A%22hello%20world%22%2C%22page%22%3A1%7DPrivacy
All encoding happens in your browser. No JSON is sent to a server.
URL length limits
While there is no strict limit, browsers and servers often cap URLs at around 2,000-8,000 characters. For large JSON payloads, consider POSTing in a request body instead of embedding in the URL.

