Free URL Component Encoder & Decoder Online

Encode a URL component or decode valid percent-encoded UTF-8 text.

Preparing your local workspace…
METHOD, EXAMPLES & ANSWERS

How to use URL Component Encoder & Decoder

Encode a URL component or decode valid percent-encoded UTF-8 text.

About URL Component Encoder & Decoder

Percent encoding protects reserved characters when text is used as a URL component, such as a query parameter value. Encoding an entire URL would also encode structural characters such as slashes, colons and separators. For that reason this workspace treats the pasted value as one component rather than trying to reconstruct a complete URL.

Use Encode for an ordinary string and Decode for a component containing percent escapes. A plus sign remains a plus sign when decoding a URI component; application/x-www-form-urlencoded has separate plus-to-space rules. Invalid escape sequences produce an error instead of silently altering the input.

  1. Use Encode for an ordinary string and Decode for a component containing percent escapes.
  2. Select or enter the labeled options, then run locally.
  3. Review the result, limitations and worked example before copying or exporting.

How it works

Uses encodeURIComponent and decodeURIComponent for a single component.

A quick example

a&b=hello world becomes a%26b%3Dhello%20world.

Assumptions, edge cases & limits

  • Use Encode for an ordinary string and Decode for a component containing percent escapes. A plus sign remains a plus sign when decoding a URI component; application/x-www-form-urlencoded has separate plus-to-space rules. Invalid escape sequences produce an error instead of silently altering the input.
  • This workspace does not save inputs. Use synthetic or redacted data and verify output before production use.

Questions about URL Component Encoder & Decoder

How do I encode a URL query parameter or decode percent escapes?

Paste a single URL component and select encode or decode. Do not encode an entire URL as one component; malformed escapes can be rejected.

Can I encode an entire URL?

This tool encodes one component; whole URL structure will not be preserved.

Does plus decode to a space?

No. Form-urlencoded decoding is a different convention.

How are spaces represented?

Encoding uses %20 for a space.

What happens to invalid percent escapes?

The decoder reports an error.

For processing, privacy and service availability, see our privacy details and methodology. Tool-specific questions and limitations are explained above.

A result or explanation needs correcting? Tell us the tool name and an example.