gizmobench
BrowseDaily

URL Encoder

This page opens Encode and Component. Type one value in the Decoded box to produce percent-encoded text in the Encoded box. Component is the normal choice for a query value, path segment or fragment value; Full URI retains the separators of a whole address, while Form uses a plus for a space. Opening this preset does not replace remembered settings; choosing the corresponding control saves that choice.

Direction
Mode

Encoding as one Component of a URL: the separators are escaped, so the result is ready to drop in after a question mark or an equals sign.

  • day%2Fnightcomponent mode
    day/night
  • The same in full URI modereserved escapes kept
    day%2Fnight
  • a+b in form modea plus reads as a space
    a b
  • %E0%A4a truncated sequence
    The sequence at position 1 ("%E0%A4") starts a character UTF-8 writes in 3 bytes, but only 2 of them are here. Paste the rest of the sequence, or delete it.

Type in either box: editing the encoded side decodes, editing the decoded side encodes. Swap sends the text you have to the other box, which is the fix for a paste that went in the wrong one. Positions in an error message count characters from the start of the box, beginning at 1.

Which mode, and why it changes the answer. Component is for one piece of a URL: a query value, a path segment, a fragment. It escapes the characters that separate the parts of an address, so a value holding a slash or an ampersand cannot be mistaken for the structure around it. Full URI is for a whole address: it leaves those separators alone, so the link still reads as a link after a round trip, which also means %2F stays written as %2F. Form is for a field a browser submitted, where a space is written as a plus and a plus that was really typed is written as %2B.
Accuracy. Exact, and the mode decides the answer. Component mode escapes the characters that separate the parts of a URL, which is what a query value needs; full URI mode leaves them alone so a whole address survives a round trip; form mode treats a plus as a space, which is right for form submissions and wrong everywhere else.

Common questions

How do I encode one query parameter?
Choose Component and enter only its value, such as café + bar. Copy the encoded value into the query string where it belongs. This is text escaping; the tool does not serialize an object, assemble named parameters or navigate to the resulting address.
Should I encode a whole URL or its components?
Select Full URI for a complete address whose structural separators must remain. Select Component for one value whose slash, ampersand, equals or # must not be read as structure. Form is for a submitted field whose spaces use +. The shared mode control selects the rule explicitly.
Can I double-encode or encode every character?
Each encode pass escapes the current text, so an existing percent sign becomes %25. Copy the output back to the input to add another layer deliberately. Alphanumeric and other mode-specific unreserved characters remain unchanged; there is no force-escape-all option.

Exact, and the mode decides the answer. Component mode escapes the characters that separate the parts of a URL, which is what a query value needs; full URI mode leaves them alone so a whole address survives a round trip; form mode treats a plus as a space, which is right for form submissions and wrong everywhere else.