Encodes text using encodeURIComponent(), replacing special characters with their percent-encoded equivalents (e.g. space becomes %20). Essential for constructing safe URLs, query parameters, and form data.
URL Encoder
Encode text for safe use in URLs
How to url encode text
- 1.Type or paste your text in the input panel.
- 2.The URL-encoded version appears instantly.
- 3.Click Copy to grab the encoded string.
- 4.Use this in URLs, query strings, or form submissions.
About This Tool
Frequently Asked Questions
All characters except A-Z, a-z, 0-9, and - _ . ~ are encoded. Spaces become %20, ampersands become %26, etc.
This tool uses encodeURIComponent, which encodes all special characters including /, ?, &, and =. encodeURI leaves those intact because they have meaning in full URLs.
Whenever you include user input in a URL query string, form action, or API call. Failing to encode can break the URL or create security vulnerabilities.