URL Encoder Decoder

Enter a URL component and choose whether to encode or decode it.

Your input stays in your browser.

Last reviewed

Use the URL encoder decoder for one component

The URL encoder decoder transforms a single value such as the text for a search parameter. A URL uses characters such as ampersand and equals sign to separate its parts. When those characters belong inside your value, encode the value before inserting it. The decoder reverses percent escapes, allowing you to read a value that was copied out of a URL.

Encode a search for cats and dogs

The example cats & dogs becomes cats%20%26%20dogs. Each space becomes %20 and the ampersand becomes %26. You can put the result after q= in a search URL, leaving the question mark and the equals sign as separators. If you paste and encode the entire URL at once, the punctuation that makes the URL navigable can also be encoded.

Know when a plus sign stays a plus

This tool represents a space as %20. Some forms use a plus sign for a space under a different convention. The decoder here leaves a literal plus sign unchanged and turns %2B into a plus. If you are reading data created by a form that uses plus for spaces, decode it with that form convention. Check the expected format before transforming addresses or sharing links.

Watch for a value that is already encoded

A percent sign becomes %25 when you encode it as literal text. For example, encoding the already encoded sequence %20 gives %2520. Decoding that once returns %20, and decoding again returns a space. Treat encoding as a step you apply once per layer. If a site shows percent codes in its search box, verify that the value was encoded only as many times as the site expects.

Handle non-ASCII text and invalid sequences

The tool uses UTF-8 when it turns characters such as é into percent escapes. The encoded form of é is %C3%A9. A sequence like %ZZ cannot represent a hexadecimal byte. When decoding fails, check for a missing character after a percent sign or for bytes that fail to form UTF-8. The operation runs locally, and you can fix the input without leaving the page.

Frequently asked questions

How do I encode an ampersand?

An ampersand inside a value becomes %26.

How is a space encoded?

This tool uses %20 for a space.

Does decoding turn plus into space?

A literal plus sign stays a plus in this component decoder.

Should I encode an entire URL?

Encode the individual value, then place it into the URL with its separators.

Why did %20 turn into %2520?

Encoding an already encoded value encodes the percent sign too.

Can I encode accented letters?

Yes. The encoder uses UTF-8 percent escapes.

Next step Base64 Encoder and Decoder

More free tools