Encoding Tools
JSON URL Encode / Decode
Put JSON in a URL safely — validated, percent-encoded, and decoded back to pretty-printed JSON.
In short
URL-encode JSON for query strings online — validated first, percent-encoded safely. Decode mode restores and pretty-prints the JSON. Free, instant.
By NaveenKumar T · Updated
Learn: URL Encoding Explained: %20 vs +, Reserved Characters, When to Encode
- Validates JSON before encoding
- Decode restores pretty JSON
- Exact error positions
Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →
Example
JSON URL Encode: input and output
A saved-search filter being placed in a ?filter= query parameter.
{
"status": ["open", "pending"],
"assignee": "maría",
"limit": 25
}%7B%0A%20%20%22status%22%3A%20%5B%22open%22%2C%20%22pending%22%5D%2C%0A%20%20%22assignee%22%3A%20%22mar%C3%ADa%22%2C%0A%20%20%22limit%22%3A%2025%0A%7DEvery brace, quote, colon and bracket became a percent sequence, the line breaks and indentation survive as %0A and %20, and the í expanded to its two UTF-8 bytes, %C3%AD — minify first for a shorter URL.
Learn more
JSON in query strings, done right
Passing structured filters or state in a URL (?filter={...}) requires every brace, quote, and space to be percent-encoded — one missed character and the server sees truncated JSON. This tool validates your document, then encodes it with encodeURIComponent so it survives any query string, web framework, and proxy.
Decode mode is the debugging direction: paste the mystery filter= value from a log or address bar and get readable, formatted JSON — plus a precise error if what's in the URL was never valid to begin with.
Help
Frequently asked questions
Everything you need to know about the JSON URL Encode.
01How do I use JSON URL Encode?
Paste JSON and Encode to get a query-string-safe value; paste an encoded value and Decode to get validated, pretty-printed JSON back. Invalid JSON is reported with its exact position before any encoding happens.
02Why validate the JSON before encoding it?
Because an encoded blob hides its content: if you encode broken JSON, the error surfaces far away — at the receiving API, as a 400 with no context. Validating first means what goes into the URL is guaranteed parseable when it comes out.
03Does Encode compact my JSON first, or encode it exactly as pasted?
Exactly as pasted, apart from trimming the ends. The document is parsed only to prove it is valid; the original text — indentation, line breaks, key order — is what gets percent-encoded, so pretty-printed input produces a value full of %20 and %0A. Run it through JSON Minify first if URL length matters. Decode is the opposite: after decoding it re-serializes with two-space indentation, so a compact one-liner comes back formatted. The parser is strict JSON — comments and trailing commas are reported as errors.
Keep working
Related tools
URL Encode / Decode
Encoding Tools
JSON Formatter
Format, beautify, and validate JSON instantly in a professional VS Code-style editor — free, fast, and 100% private.
Base64 to JSON
Decode Base64 payloads straight to validated, pretty JSON — or encode JSON to Base64 for headers and env vars.
JSON Escape
RFC 8259 string escaping both ways — make any text safe inside a JSON string, or decode the backslash soup back to text.
XML URL Encode
Encoding Tools
YAML URL Encode
Encoding Tools
Learn the format
Related guides
URL Encoding Explained: %20 vs +, Reserved Characters, When to Encode
What percent-encoding does, which characters are reserved, why forms use + for a space, and how encodeURIComponent, encodeURI and URLSearchParams differ.
9 min readGuide · Web & APIsHow to POST JSON with curl (Without Quoting Pain)
POST JSON with curl correctly: the Content-Type header, shell quoting on Linux/Mac vs Windows, sending from files with @, and pretty-printing responses.
2 min read