URL Encoder
Encode text, query parameters, special symbols, and Unicode characters for web addresses and URLs.
Run tool
The online URL Encoder tool converts special characters, spaces, punctuation, and Unicode text into standard percent-encoded format for safe transmission in web addresses. When building API requests, web forms, or query strings, unencoded characters like spaces, ampersands, and slashes can break URL structure or cause parsing failures. This tool replaces reserved and non-ASCII characters with standard percent-encoded sequences such as %20 for spaces. You can adjust how the conversion operates using optional controls. Enabling the query encoding option formats query parameters using query-style conventions, such as encoding spaces as plus signs when needed. You can also specify safe characters in the designated field to preserve exact symbols, such as slashes or colons, without converting them. If the input field is left empty, the tool displays an error notification prompting for valid text. Paste your string, configure optional character settings, and view your formatted output instantly in the result area.
Instructions
- Enter or paste the string you want to encode into the Text field.
- Check the Encode Query option if you need query-style parameter formatting.
- Type any characters you want left untouched into the Safe characters box.
- Click Run to process the text and view the percent-encoded string in the result panel.
Examples
- Encoding "hello world & foo=bar" with default settings produces "hello%20world%20%26%20foo%3Dbar".
- Encoding "https://example.com/search?q=tea & coffee" while setting Safe characters to "/:?=" preserves the URL structure while converting spaces and ampersands.
FAQ
Why are spaces converted to %20 instead of plus signs by default?
Standard percent-encoding uses %20 for spaces in path segments and general URL components. Enabling the Encode Query setting applies query-style rules that represent spaces as plus signs.
What happens if I submit an empty text field?
The tool expects nonempty text. If the text input is blank, the result area shows an error message indicating that input is required.
How do I prevent certain characters from being encoded?
Enter the characters you want to retain in the Safe field. Any symbol listed there will bypass percent-encoding and remain as-is in the final string.