CCalcvers

URL Encoder / Decoder

Percent-encode and decode URL components.

https%3A%2F%2Fcalcvers.com%2Fsearch%3Fq%3Dhello%20world%26x%3D1

Was this calculator useful?

URLs can only contain a limited set of characters, so anything else must be percent-encoded. This tool encodes text for safe inclusion in a URL and decodes it back.

How percent-encoding works

Reserved and unsafe characters are replaced by a percent sign and their two-digit hexadecimal byte value. A space becomes %20, an ampersand %26, and so on. Decoders reverse the process to recover the original text.

Component vs full URL

Encoding a single value (like a search term) needs encodeURIComponent, which escapes URL-structural characters. Encoding an entire URL uses encodeURI, which preserves them. This tool handles the component case, the one people need most.

Frequently asked questions

Also called percent-encoding, it replaces characters that aren't safe in a URL (like spaces, &, ?, =) with a % followed by their hex code — for example a space becomes %20.

Whenever you put arbitrary text into a URL — especially query parameters. Encoding prevents special characters from breaking the URL's structure.

This tool uses encodeURIComponent, which escapes characters like & and = so a value is safe inside a single query parameter. encodeURI leaves those intact for encoding a whole URL.

Continue your calculation

Explore more calculators

Find the right tool for whatever you need to work out.

Browse all