All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 36 Text Tools 12 Shipping Freight Tools 5 Calculator 4 Marketing Tools 3
About Contact Privacy

JSON URL Encoder

Percent-encode JSON for URL query strings and fragments instantly. Correct encodeURIComponent encoding, plus-mode option, live preview, copy and download.

JSON Input
Waiting for input
URL-Encoded Output
Paste the encoded value after a query parameter, e.g. ?data=... Percent-encoding is reversible — the URL decoder tool restores the original JSON.

About JSON URL Encoder

URLs are stingy about what they accept. Braces, quotes, colons, spaces, ampersands and slashes all carry meaning in a URL, so the moment you try to ship JSON through a query string or fragment — passing state between pages, prefilling a form, sharing a filtered view, embedding config in a widget — the URL breaks: the value truncates at the first ampersand, the server rejects the braces, or the browser sends a malformed request.

The fix is percent-encoding, and the classic mistake is doing it with the wrong function. The legacy escape() function corrupts UTF-8, producing mojibake the receiver cannot repair. JSON URL Encoder implements encodeURIComponent semantics correctly: every reserved character becomes a safe %XX sequence, Unicode content is encoded as proper UTF-8, and you can choose the form-encoding convention (+ for spaces) when the receiver expects it. Validate your JSON, watch the encoded value update live, grab the ready-to-paste query usage, and copy or download — all client-side, nothing uploaded.

Features

  • Correct encoding: Uses encodeURIComponent semantics — every reserved character encoded, no mangled UTF-8, no legacy escape() corruption.
  • JSON validation first: Broken documents are flagged before encoding so you never publish a truncated value.
  • Plus-mode option: Switch %20 to + for receivers that parse form-style query strings.
  • Optional reformat: Pretty-print the JSON before encoding to keep the round trip readable.
  • Ready-to-paste usage: An example ?data=... line is generated alongside the encoded value.
  • Live conversion: The output updates as you type — no convert button required.
  • Copy and download: Grab the encoded string or save it as a file in one click.
  • Size visibility: Character counts on both sides show exactly how much the encoding added.

How to Use

  1. Paste your JSON into the input pane. Syntax is validated immediately.
  2. Choose the conventions. Turn on plus mode if the receiver parses form-encoded values; leave it off for standard percent encoding. Reformat on if you want the round trip to be readable.
  3. Watch the output update live — every reserved character becomes a %XX sequence.
  4. Use the usage line to see exactly how the value slots into a query string: ?data=.
  5. Copy or download the encoded value. Note the length: URLs have practical limits around 2,000 to 8,000 characters.

Examples

Example 1 — Sharing a filtered dashboard view. A team wants to share a report with filters applied. The filter JSON {filters:[{field:"region",op:"eq",value:"eu-west"}]} is URL-encoded into the fragment: #view=eyJmaWx0... — the URL stays shareable, and the receiver decodes it back with the URL decoder tool.

Example 2 — Prefilling a form via link. A support page accepts prefilled fields from a campaign link. The defaults JSON is encoded into ?prefill=... and the form reads it on load. Encoding is what keeps the braces and quotes from breaking the URL.

Example 3 — Widget configuration. An embeddable chart widget takes its config as a query parameter. The config JSON goes through this encoder, the widget decodes it, and the