URL encoding
Parameter names and values are encoded so spaces, punctuation, and reserved characters can be represented safely in a query string. The parser decodes values for easier inspection.
Build a URL with encoded query parameters or parse an existing URL into its component parts. Add, remove, disable, sort, or duplicate parameters and copy the result as a URL, query string, JSON object, or request code.
Parameter names and values are encoded so spaces, punctuation, and reserved characters can be represented safely in a query string. The parser decodes values for easier inspection.
Duplicate keys are valid for APIs that accept repeated parameters. Individual rows can be disabled temporarily without deleting their values.
Yes. Duplicate parameter names are supported because many APIs use repeated keys for lists and filters.
Yes. Parameter names and values are URL encoded in the generated output.
Yes. Parse mode displays the URL components, parameters, and a JSON representation.
(no parameters)(no parameters)// JavaScript - URLSearchParams
const params = new URLSearchParams();
params.append('page', '1');
params.append('limit', '10');
const url = 'https://api.example.com/endpoint?' + params.toString();
console.log(url);
// JavaScript - Fetch API
fetch(url)
.then(response => response.json())
.then(data => console.log(data));# Python - requests library
import requests
params = {
'page': '1',
'limit': '10',
}
response = requests.get('https://api.example.com/endpoint', params=params)
print(response.url)
print(response.json())# cURL command
curl -X GET "" \
-H "Accept: application/json"<?php
// PHP - using http_build_query
$params = [
'page' => '1',
'limit' => '10',
];
$url = 'https://api.example.com/endpoint?' . http_build_query($params);
echo $url;
// Using cURL
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);