Encode a search value
red & blueExpected: red%20%26%20blue
The ampersand belongs to this value rather than separating query parameters.
Make special characters safe for your next URL parameter.
Something missing? Suggest an improvement →
These examples show expected results and common failure cases. Loading an example replaces the tool input after confirmation when you already have text.
red & blueExpected: red%20%26%20blue
The ampersand belongs to this value rather than separating query parameters.
100%25Expected: 100%
The decoded percent sign is literal text. Decoding it again is not valid.
Uses encodeURIComponent for individual URL parameters and decodeURIComponent for decoding. A plus sign is not automatically treated as a space.
For a query value red & blue, Encode returns red%20%26%20blue. You can place that after ?q= without its ampersand starting another parameter. Encoding an entire https:// address here also encodes its separators because the tool uses component encoding, not whole-URL encoding.
If an existing value already contains %20, encoding it again changes the percent sign to %25. Decode only when you know the current layer of encoding. A literal plus sign stays a plus sign when decoding here; some HTML form parsers instead interpret plus as a space.
A percent sign needs two hexadecimal digits, and the encoded bytes must describe valid text. Truncated sequences can fail to decode. Keep the original value while investigating and compare it with the sender’s expected format. This tool does not fetch the URL or check whether its destination exists.
This tool runs in your browser. Inputs and results are not sent to our server. Closing or refreshing the page clears your work, so save any results you need.