Encode special characters for safe URL transmission or decode percent-encoded strings back to human-readable text.
URL encoding (percent-encoding) replaces unsafe ASCII characters with a % followed by two hex digits. This ensures special characters don't interfere with URL parsing.
| Character | Encoded |
|---|---|
| space | %20 |
| & | %26 |
| = | %3D |
| + | %2B |
| / | %2F |
| ? | %3F |
| # | %23 |
| @ | %40 |
## Encode URL component
curl -X POST https://apitoolkit.pro/api/v1/url-encode \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"encode","input":"hello world & more=stuff"}'
## Decode (JavaScript)
const res = await fetch('https://apitoolkit.pro/api/v1/url-encode', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ action: 'decode', input: 'hello%20world%20%26%20more%3Dstuff' })
});
const { result } = await res.json();