workspacereference / tools / guidesPUBLIC TOOLS
Quillstack Reference
Browse ▾
LOCAL TOOL / URL

Encode a component, decode a string.

Handle URL query values and path segments safely using standard percent encoding.

02 / URL

Component encoding

Executed in this browser

Why component matters

The encoder uses encodeURIComponent, which is suitable for the value of a URL component rather than an entire URL. It also percent-encodes spaces, so a space becomes %20.

The decoder uses decodeURIComponent. A malformed percent sequence or invalid UTF-8 is reported as an error. The tool does not silently treat + as a space; HTML form encoding follows a different convention.