Keep a query value from becoming URL syntax
Percent-encoding lets a value contain spaces, ampersands, slashes, or Unicode without those characters being mistaken for URL separators. This tool applies JavaScript URI-component encoding. Encode an individual query value or path segment, then assemble the surrounding URL separately.
How to use URL Encoder/Decoder
- Paste a URL component, or upload a text file up to 1 MB.
- Choose Encode or Decode.
- Enable bulk mode for one component per line.
- Use Auto-update or Process now, then copy or download the result.
Practical examples
Encode a search phrase
Input or settings
tea & cakeExpected result
tea%20%26%20cakeUse the result as the value in ?q=tea%20%26%20cake. The ampersand stays inside the search phrase.
Decode a literal plus and a space
Input or settings
C%2B%2B%20tipsExpected result
C++ tipsPercent-encoded plus signs become plus signs. An unescaped plus sign also remains a plus sign in this tool.
Avoid double encoding and form-encoding mix-ups
Encoding a complete URL also escapes its colon, slashes, and query separators. That is useful when nesting a URL inside another parameter, but not when you want a directly navigable link.
Encode once at the boundary where a raw value becomes a URL component. Encoding %20 again produces %2520. Decoding malformed sequences such as %ZZ or incomplete UTF-8 produces an error instead of guessed text.
This is not a form-urlencoded parser: + is not converted to a space. For form query strings in code, use URLSearchParams. Text-file uploads are limited to 1 MB; bulk mode keeps each input line as a separate component.
When this tool helps
- Prepare a single query parameter containing punctuation.
- Read a percent-encoded value from a log entry.
- Convert a list of independent components using line-by-line mode.
Questions about URL Encoder/Decoder
Why are slashes and question marks encoded?
The tool uses encodeURIComponent, which treats the input as one value. Keep structural separators outside that value when building a URL.
Why did my plus sign stay a plus sign?
decodeURIComponent does not use the form convention where + represents a space. A percent-encoded space is %20.
Does encoding make a destination safe?
No. Percent-encoding changes representation, not trust. Validate the destination’s scheme and host separately before opening or redirecting to it.