URL Encoder
Escape string online and percent-encode query parameters with URL Encoder. Encode reserved characters safely in your browser, no upload needed.
Runs locally in your browser. Your input is not uploaded to DevToolMate servers.
Encoding rules
Uses encodeURIComponent, so reserved characters in query values and URI components are escaped.
Developer Quick Tips
- Escape spaces to %20, ampersands to %26, equals to %3D, and reserved characters safely for query parameters.
- Percent encode Unicode as UTF-8 bytes: é becomes %C3%A9, ñ becomes %C3%B1 for safe URL transmission.
- Build API query strings by encoding each parameter value separately, then concatenate with unencoded delimiters.
- Test encoding instantly, then use URL Decoder to verify roundtrip results match your original input.
- Encode user input before building URLs to prevent injection issues and malformed API requests.
Frequently asked questions
How do I escape a string online for use in a URL?
Paste your string into URL Encoder and it will percent-encode reserved characters using encodeURIComponent. Spaces become %20, ampersands become %26, and special characters like ?, &, =, # are escaped. Copy the output and paste it into your query string or URI component.
How do I percent encode a query string for an API call?
Use URL Encoder to encode each query parameter value separately. For example, encode 'hello world' to get 'hello%20world', then build your query string: myapi.com/search?q=hello%20world. This ensures spaces and special characters do not break your API request.
How does percent encoding work for Unicode characters?
Unicode text is encoded as UTF-8 percent bytes. For example, é becomes %C3%A9, ñ becomes %C3%B1, and 中 becomes %E4%B8%AD. This ensures special characters and non-ASCII text are safely transmitted in URLs.
Can I use this tool to test encodeURIComponent in JavaScript?
Yes. URL Encoder demonstrates how encodeURIComponent works in JavaScript. You can use the same function in your code: encodeURIComponent('hello world') returns 'hello%20world'. This tool lets you test encoding before writing code.
What characters are escaped when I percent encode a string?
URL Encoder escapes reserved characters including spaces (%20), ampersands (%26), equals signs (%3D), question marks (%3F), hashes (%23), and other special characters. Only unreserved characters (letters, digits, hyphen, underscore, period, tilde) remain unencoded.
Does URL Encoder upload my data to a server?
No. URL Encoder runs locally in your browser using encodeURIComponent. Your input is not uploaded to DevToolMate servers or any external service.
Is URL Encoder free and do I need an account?
Yes. URL Encoder is completely free with no account required. Processing stays on your device and your input is cleared when you close the tab.
Related tools
- URL Decoder: Unescape percent-encoded URLs and query strings locally in your browser. Free URL decoder online, no upload, no account. Handles plus signs, Unicode, and form data.
- HTML Entity Encoder: Escape string online free. Convert &, <, >, and quotes to HTML entities in your browser. No upload, no account, no server processing.