Skip to main content
Calnex LogoCalnex
Conversion

URL Encoder / Decoder

Percent-encode or decode a UTF-8 URI component using JavaScript encodeURIComponent and decodeURIComponent. Use it for a query value or other component, rather than assuming it preserves a complete URL.

Real-time Results

Result Output

Process completed successfully.

https%3A%2F%2Fcalnex.pro%2Fsearch%3Fquery%3Dhello%20world!

Why Choose URL Encoder / Decoder

Percent-encode or decode a UTF-8 URI component using JavaScript encodeURIComponent and decodeURIComponent. Use it for a query value or other component, rather than assuming it preserves a complete URL.

    How to Calculate

    1. 1Enter the component to process, such as hello world.
    2. 2Choose Encode to obtain hello%20world, or Decode to reverse valid percent encoding.
    3. 3Insert the result in the appropriate URL component; verify the complete URL separately.

    Frequently Asked Questions (FAQ)

    Why does a complete URL lose its separators?

    encodeURIComponent encodes reserved separators such as : / ? & and =. It is intended for components. Encoding a complete URL with it changes the structure rather than simply replacing spaces.

    Does a plus sign decode to a space?

    No. decodeURIComponent leaves + as +. Form-encoded query strings can use + for spaces, which requires form parsing rather than plain component decoding.

    What does a decoding error mean?

    An incomplete percent escape or invalid UTF-8 byte sequence cannot be decoded. The tool returns an error instead of guessing the original text.

    Authoritative References & Sources

    MDN — encodeURIComponent

    View Source
    Back to ConversionAll Calculators