Encoding & Conversion

URL Encoder & Decoder

A parameter such as a search phrase can contain spaces, ampersands and other characters that have special meaning in a URL. Encode the value before inserting it into a query or route segment. This page uses the browser’s component encoder, so it also escapes colons and slashes. Decode once when examining a value that was encoded once: repeated decoding can change data unexpectedly. The tool does not fetch the URL, follow a link or check whether a destination exists.

Your workspace

Runs locally in your browser

Result

Your input is processed locally in your browser unless explicitly stated otherwise. Inputs are not saved by this tool.

How to use this tool

Paste a parameter value and choose Encode. Use Decode for an already percent-encoded component.

Example

Input

hello world & tea

Output

hello%20world%20%26%20tea

What does this tool do?

Percent encoding represents characters as escaped bytes inside a URL component. It keeps delimiters in a parameter value from being interpreted as URL syntax.

Common mistakes and limitations

This tool uses encodeURIComponent, not whole-URL encoding. Plus signs are preserved during decoding; form-encoded spaces require separate handling.

Frequently asked questions

Should I encode an entire URL?

Usually no. Encode individual parameter values; encoding the whole URL also escapes its separators.

Related tools