TL
Tool Lab
💰Donate
💰Donate

URI Component Encoder

Percent-encode or decode URI components and full URLs online.

Function:
Plain Input

About This Tool

The URI Component Encoder / Decoder wraps the browser's native encodeURIComponent, decodeURIComponent, encodeURI, and decodeURI functions in a convenient UI. Percent-encoding replaces characters that are not allowed in URLs with a % followed by two hexadecimal digits representing the UTF-8 byte.

encodeURIComponent / decodeURIComponent treats the input as a single component (query value, path segment), encoding all special characters. encodeURI / decodeURI treats the input as a full URL, preserving structural characters like ://?=# so the URL shape is maintained.

How to Use

  1. Choose Encode to percent-encode, or Decode to reverse the process.
  2. Select the function: encodeURIComponent for a single value, or encodeURI for a full URL.
  3. Paste your input or click Sample to load an example.
  4. Click Convert, then Copy the result.

Use Cases

Front-end developers encode query string values before appending them to URLs. Back-end engineers decode percent-encoded form payloads for inspection. QA engineers verify URL encoding before filing bugs. API integrators encode authentication tokens or special characters in request URLs.

FAQ

  • What is the difference between encodeURI and encodeURIComponent?encodeURI is for full URLs and does not encode characters valid at the URL level (:/?#&). encodeURIComponent is for individual components and encodes those structural characters too.
  • Why does a space become %20 and not +?Percent-encoding (%20) is the standard defined by RFC 3986. The + notation is specific to HTML form encoding (application/x-www-form-urlencoded) and is not used by these functions.
  • Is my data sent anywhere?No. Everything runs in the browser using JavaScript built-ins. Nothing is transmitted to a server.