Mastodon
99Tools.net

JSON URL Encode

Why Do You Need to URL Encode JSON?

JSON (JavaScript Object Notation) is the standard format for data exchange, but it is incompatible with strict URL standards. URLs allow only a specific set of US-ASCII characters (alphanumeric and a few symbols).

JSON contains “unsafe” characters that break URLs, such as:

  • Curly Braces { }: Reserved for delimiters.
  • Double Quotes ": Used to define strings.
  • Colons :: Used for port numbers or protocols.
  • Spaces: Not allowed in URLs at all.

If you paste raw JSON directly into a browser address bar or an API endpoint, the request will fail. This tool applies Percent-Encoding to your JSON, converting { to %7B, spaces to %20 (or +), and quotes to %22, making the string universally readable by web servers.

How to Use This Tool

We have designed a clean, distraction-free interface to speed up your workflow.

  1. Input Your Data: Paste your raw JSON string into the top box labeled “Enter JSON to URL Encode”.
  2. Upload File (Optional): If you have a large .json configuration file, click “Upload JSON File” to load it directly without manual copying.
  3. Process: Click the “Encode JSON” button.
  4. Get Results: The valid, encoded string will appear immediately in the “URL Encoded Output” box.
  5. Copy & Go: Hit “Copy Output” to save the string to your clipboard and paste it into your API client (like Postman) or browser.

Real-World Example

The Scenario: You need to filter a user list via an API GET request using a JSON filter.

Raw JSON Input:

JSON

{
  "role": "admin",
  "limit": 10,
  "sort": "desc"
}

The Problem: You cannot send: api.com/users?filter={"role": "admin"}. This is an invalid URL.

The Solution (Our Tool’s Output):

Plaintext

%7B%0A%20%20%22role%22%3A%20%22admin%22%2C%0A%20%20%22limit%22%3A%2010%2C%0A%20%20%22sort%22%3A%20%22desc%22%0A%7D

The Valid URL: api.com/users?filter=%7B%22role%22%3A%22admin%22...%7D

Frequently Asked Questions (FAQ)

Can I decode the URL back to JSON here?

This specific tool allows for Encoding. If you have a messy string full of % signs and need to read it, please use our JSON URL Decode tool to revert it to a human-readable format.

Does this support nested JSON arrays?

Yes. Whether your JSON is a simple key-value pair or a complex nested array structure, the encoder iterates through the entire string to ensure every single character is safely mapped to its percent-encoded equivalent.

Is there a character limit?

While our tool can handle massive strings, remember that web browsers and servers have their own limits on URL length (typically around 2,048 characters). If your encoded JSON exceeds this, consider switching your API method from GET to POST and sending the JSON in the request body instead.

RECOMMENDED
JSON Parser
Try Now âž”