⚡ Percent, Base64URL RFC 7515 & API URL Builder

JSON URL Encode Online

Validate and URL-encode JSON objects into percent-encoded strings, Base64URL RFC 7515 payloads, full API request URLs, and code snippets (cURL, JS, Python) with 100% browser privacy.

How to Use the JSON URL Encoder

1

Paste Raw JSON

Paste any valid JSON object or select one of our preset sample templates.

2

Configure Options

Set space encoding (%20 vs +), Base URL, and query parameter key.

3

Choose Output Format

Select Percent-Encoded Output, Base64URL Payload, Full API URL, or Code Snippets.

4

Copy & Execute

Copy generated cURL commands or encoded URLs for instant use in your applications.

Encoding JSON for HTTP Query Strings, Base64URL RFC 7515, & API Length Limits

Passing JSON objects through HTTP GET request query parameters requires converting raw JSON strings into URI-safe formats. Standard percent-encoding converts reserved characters such as { to %7B and " to %22.

Comparing Percent-Encoding vs Base64URL Encoding

FormatSample OutputPrimary Benefit
Percent-Encoded (RFC 3986)%7B%22name%22%3A%22Alice%22%7DHuman readable in server logs & native URI decoder support
Base64URL (RFC 7515)eyJuYW1lIjoiQWxpY2UifQCompact, clean URLs without percent symbol clutter

Managing HTTP GET URL Length Thresholds

Most modern web browsers, proxies (NGINX, Cloudflare), and web servers enforce a GET request URL length limit of approximately 2,000 characters. If an encoded JSON string exceeds 2,000 characters, consider switching to HTTP POST requests with a JSON body.

100% Local Browser Privacy & Security

JSON objects being encoded often contain internal query filters, OAuth scopes, or API keys. Our JSON URL Encoder operates 100% locally in your web browser using JavaScript Web Workers. Zero JSON data or API parameters leave your device.

Frequently Asked Questions

Why do I need to URL-encode JSON objects?

JSON objects contain characters like {, }, ", and : that have special structural meaning in URIs. URL-encoding converts these special characters into %HH percent-sequences so the JSON can be safely passed as an HTTP GET query parameter.

What is the difference between Percent-Encoding and Base64URL for JSON?

Percent-encoding replaces special characters with %HH codes (e.g. %7B for {). Base64URL (RFC 7515) encodes the raw JSON bytes into a compact URL-safe string (- and _ without = padding), producing cleaner URL parameters.

Does this tool validate my JSON before encoding?

Yes. The encoder parses and validates your JSON input first. If syntax errors exist (like trailing commas or missing quotes), an informative error message is displayed before encoding.

How does the Full API URL Builder work?

You can specify your endpoint Base URL (e.g. https://api.com/v1/search) and query parameter key (e.g. filter), and the tool automatically generates the complete ready-to-use API URL string.

What code snippets are generated?

The tool automatically generates copyable code blocks for cURL commands, JavaScript fetch() calls, and Python requests scripts.

What is the browser URL length limit warning?

Most modern web browsers and HTTP proxies enforce a GET request URL limit of approximately 2,000 characters. If your encoded URL exceeds 2,000 characters, a warning badge alerts you to use HTTP POST instead.

When should I use + instead of %20 for space encoding?

Use + for HTML form submissions (application/x-www-form-urlencoded). Use %20 for standard RFC 3986 URI component query parameters.

Is my input JSON data or API payload sent to any server?

No. 100% of encoding, validation, Base64URL conversion, and code snippet generation runs locally inside your web browser using JavaScript Web Workers. Zero data leaves your machine.

What structural metrics are calculated?

The Metrics view displays the total count of AST object/array nodes, maximum nesting depth, and the size expansion ratio (encoded length vs raw JSON length).

How do I switch to JSON URL decoding?

Click the "Switch to Decode" link or navigate to /encode-decode/json-url-decode to decode percent-encoded JSON strings back into readable JSON objects.

Related Encoding & Decoding Tools