Independent tech guides — Useful tools — Made in Canada
Free tool / Text

URL component encoder and decoder

Encode or decode a URL component with UTF-8 percent encoding. See how spaces, plus signs and reserved characters are handled locally.

Use the tool ↓How it works ↓ Processed on this device
01 / INPUT

02 / RESULTLocal calculation

Converted text

Ready

The output updates as you type. Encoding does not hide information.

Inputs are processed in this tab. No text, paths or results are sent to our server or saved in an account. Privacy details.

From input to a useful answer.

  1. 01

    Choose encode or decode for one URL component.

  2. 02

    Paste component text, preserving intentional plus signs.

  3. 03

    Inspect the result before inserting it into an address.

Encode a component rather than a complete URL

Percent encoding represents selected UTF-8 bytes using a percent sign and two hexadecimal digits. This tool encodes text for a component such as a query value. Structural characters including ampersand, slash and equals become data when encoded, which changes their role in a complete address.

The encoder follows encodeURIComponent and additionally escapes !, apostrophe, parentheses and *. Spaces become %20 and literal plus signs become %2B. Place the result where that component belongs, leaving intended URL separators to the application constructing the full address.

Check one clear round trip

The text tea + toast becomes tea%20%2B%20toast. Decoding that result restores both spaces and the plus. A space and a plus between words are different characters; the example makes their separate representations visible before you process a larger value.

Decoding happens once. Thus %2520 becomes literal %20, not a space. Repeated decoding can change meaning again. Track which system already encoded the value instead of applying more passes until the result merely looks familiar.

Worked exampleEncode: tea + toast → tea%20%2B%20toast. Decode: tea+toast%21 → tea+toast!

Know this decoder’s boundary

This decoder keeps + literal. It is not a complete application/x-www-form-urlencoded parser. A form-style query containing maple+leaf may mean maple leaf to its receiver even though this tool leaves the plus unchanged. Use the URL inspector for that query-pair interpretation.

Invalid percent escapes or invalid UTF-8 produce an error instead of guessed replacement text. Encoding also rejects unmatched Unicode surrogates. Input is limited to 200,000 characters. The tool transforms text locally; it does not fetch an address, determine whether it exists or assess the destination’s safety.

References

MDN — encodeURIComponent ↗MDN — decodeURIComponent ↗RFC 3986 — Percent encoding ↗

A few useful answers

Should I encode https://example.com/path?

Usually encode the value being inserted, not the complete address. Encoding the entire URL also encodes structural separators.

Why does decoding a+b keep the plus?

This component decoder does not apply form-style plus-to-space conversion. %20 becomes a space; + remains literal.

Why does %252F decode to %2F?

There is one pass. %25 becomes a percent sign, leaving 2F as literal text until another decoding step.

Guides & toolsUse Tab to explore · Enter to open