URL Encode API - Free Percent-Encoding
Converts a string to percent-encoded format (RFC 3986). Spaces become %20, special characters become their hex equivalents. Safe for use in URL query parameters and path segments.
Code examples
curl -X POST https://api.botoi.com/v1/url/encode \
-H "Content-Type: application/json" \
-d '{"text":"hello world & goodbye=test"}'When to use this API
Building safe query strings
Encode user-supplied search terms before appending them to URLs so special characters like &, =, and # do not break the URL structure.
Encoding redirect URIs
Percent-encode callback URLs before passing them as OAuth redirect_uri parameters to avoid double-encoding issues.
Frequently asked questions
Does this encode spaces as + or %20?
This API uses %20 per RFC 3986. The + encoding is specific to application/x-www-form-urlencoded and is not used here.
Which characters are not encoded?
Unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) are left as-is per RFC 3986. Everything else is percent-encoded.
Can I encode an entire URL?
You can, but encoding slashes and colons will break the URL structure. Encode only the query parameter values or path segments, not the full URL.
Is double-encoding handled?
No. If your input already contains percent-encoded characters like %20, they will be encoded again to %2520. Decode first if needed.
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.