Development and data

How to encode a value for a URL component

When building an address, some characters in a value need percent encoding so they are not confused with separators.

Before you start

Text is processed in the browser. Consider the content before using it and read the privacy policy.

Privacy

How to use it

  1. Enter a+b c in the URI encoder and choose encode.

  2. Convert and check the output.

  3. Select decode, enter a%2Bb%20c and convert again.

URI Component Encoder/Decoder

Worked example

The plus sign becomes %2B and the space becomes %20; letters remain readable.

Result: a+b c → a%2Bb%20c → a+b c.

RFC 3986: URI

Limits and checks

The tool applies encodeURIComponent and decodeURIComponent to one component, not a whole URL. When decoding, a literal + does not become a space; invalid percent sequences cause an error. Limit: 20,000 UTF-16 code units.

Next step

For a readable identifier from a title, see the slug guide.

How to create a page slug from a title
Back to the blog