URL Encode Text
URL encoding (percent-encoding) replaces unsafe characters with percent-sign hex codes so they can be included in URLs without breaking the structure. This is essential for query parameters, form data, and any text embedded in a URL.
Open URL Encode & Decode →How to URL Encode Text
- Open the URL Encode/Decode tool on ToolPrime
- Paste or type the text you want to encode
- The URL-encoded output updates in real time
- Copy the encoded string for your URL or API call
Common Use Cases
- Encode user-submitted search queries for URL parameters
- Prepare special characters for REST API query strings
- Encode filenames with spaces for download URLs
- Sanitize text for safe inclusion in mailto: links
Frequently Asked Questions
What characters get encoded?▾
All characters except A-Z, a-z, 0-9, and -_.~ are percent-encoded. Spaces become %20 (or + in form encoding).
What is the difference between encodeURI and encodeURIComponent?▾
encodeURI preserves URL structure characters like / and ?. encodeURIComponent encodes everything except unreserved characters, making it safer for query parameter values.