URL Encoder & Decoder

URL Encoder & Decoder percent encode query value decode URL component text escape URL parameter
URL Encoder & Decoder

Encode one URL component at a time

Enter a path segment, query value, fragment value, or other component and choose Encode component. Paste percent-encoded text and choose Decode component to restore its UTF-8 characters.

Advertisement

Why percent encoding exists

URLs reserve characters such as question mark, ampersand, equals, slash, and hash for structure. Percent encoding represents a character's UTF-8 bytes using percent signs followed by hexadecimal digits. Encoding a component prevents its data from accidentally being interpreted as separators in the surrounding URL.

Worked example

Encoding the query value tea & cake produces tea%20%26%20cake. The ampersand becomes data instead of starting another query parameter. Decoding that component restores the original spaces and ampersand. An accented character may produce several percent escapes because UTF-8 uses multiple bytes.

Components versus complete URLs

This page follows component-style encoding comparable to JavaScript's encodeURIComponent. If you encode an entire URL, structural colon, slash, question mark, equals, ampersand, and hash characters are escaped too, making the result unsuitable as a directly navigable address. Separate the component that contains user data before encoding it.

Plus signs and form encoding

HTML form query encoding often represents a space as plus, while generic percent decoding does not automatically turn plus into a space. This tool preserves literal plus signs and uses %20 for spaces. Match the exact rules required by the protocol, framework, or API you are working with.

Privacy and limitations

Conversion happens locally and the tool does not visit, validate, shorten, or test the entered address. Decoding rejects incomplete percent escapes and invalid UTF-8 sequences. A decoded string is not automatically safe for HTML, SQL, shell commands, headers, redirects, or file paths; each destination still requires its own validation and escaping.

URL Encoding FAQ

Should I paste a whole URL?

Usually no. Encode only the path segment or parameter value that contains data.

Why did slash become %2F?

Slash is structural in a URL, so component encoding escapes it.

Does decoding open the address?

No. It transforms text without making a network request.

Related tools

Categories

Tags