JSON URL Encode
URL-encode JSON strings online - encode special characters like { } " : to %XX format for use in URLs
Input
Output
What Is JSON URL Encode?
JSON URL Encode converts JSON strings into URL-safe format by percent-encoding special characters. Characters like {, }, ", :, [, ] are encoded to %7B, %7D, %22, %3A, %5B, %5D so that JSON can be safely passed as a URL query parameter.
This tool has two modes: Encode and Decode. Toggle between them at the top. Both run in your browser; nothing is sent to a server.
How to Use This Tool
Choose Mode
Select Encode to URL-encode your JSON, or Decode to decode a URL-encoded JSON string back to readable JSON.
Paste Input
Paste your JSON or URL-encoded string into the left editor. Use Sample or Upload if needed.
Copy Result
The right panel updates automatically. Use <strong>Copy</strong> or <strong>Download</strong> to get the result. For validating JSON, try JSON Validator.
JSON URL Encode Examples
URL encoding converts special JSON characters to percent-encoded sequences. Example:
JSON input
URL-encoded output
When JSON URL Encoding Matters
When you need to pass JSON as a query parameter in a URL, JSON URL encoding is necessary. Raw JSON contains characters that are not URL-safe (like {, ", :), and including them unencoded will break the URL structure. APIs often require JSON parameters to be URL-encoded when using GET requests.
For encoding regular URLs (not JSON), use the URL Encoder tool instead.
Frequently Asked Questions
What characters get URL-encoded in JSON?
All non-URL-safe characters: { → %7B, } → %7D, " → %22, : → %3A, [ → %5B, ] → %5D, spaces → %20, and many more. The tool uses encodeURIComponent() which encodes everything except letters, digits, and -_.!~*'().
Is the JSON validated before encoding?
The tool attempts to validate the input as JSON before encoding, but will encode even invalid JSON strings. In Decode mode, it will pretty-print the result if it is valid JSON.
Is my data sent anywhere?
No. Processing runs entirely in your browser.
What is the difference between URL encode and JSON escape?
JSON escape converts characters to \n, \" etc. for embedding in JSON strings. URL encoding converts characters to %XX for safe use in URLs. Use JSON Escape for JSON, and this tool for URLs.
When should I URL-encode JSON?
When passing JSON as a GET query parameter in a URL, for example: https://api.example.com/data?filter=%7B%22name%22%3A%22John%22%7D.
Related Tools
The URL encoding standard is defined in RFC 3986. MDN encodeURIComponent() documents the JavaScript function used. The JSON specification defines JSON syntax.