URL Encoder

Encode or decode URLs to ensure safe transmission of data.

Loading Smart Logic...

Quick Tip

Pick encode or decode.

About This Tool

Why use URL Encoder?

Percent-encoding replaces characters that have a special meaning in a URL — spaces, &, ?, =, # and any non-ASCII character — with a % followed by their byte value. A space becomes %20, an ampersand becomes %26 and é becomes %C3%A9.

This tool encodes and decodes using component rules, which is what you want for a single query value: everything that could break parsing gets escaped. If you paste a whole URL into encode, the :// will be escaped too, so encode the individual parameter values rather than the full address.

Key Benefits

Component-level encoding

Escapes &, =, ?, # and spaces, so a value cannot break the query string it sits in.

Unicode handled

Non-ASCII characters are encoded as their UTF-8 bytes, which is what browsers and servers expect.

Clear decode errors

A malformed sequence such as a lone % is reported rather than silently mangled.

How to use URL Encoder

  1. 1

    Pick encode or decode.

  2. 2

    Paste the value — a query parameter, a path segment or a full encoded string.

  3. 3

    Read the result and copy it into your URL or code.

  4. 4

    When building a link, encode each parameter value separately rather than the whole URL.

Best use cases

Build a query string that contains spaces or symbols.

Decode a redirect or tracking URL to see where it points.

Prepare a search term for an API request.

Read an encoded parameter from server logs.

URL Encoder FAQs

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves URL structure characters such as :, / and ? intact so a whole address stays usable. encodeURIComponent escapes them too, which is correct for a single value inside a query string. This tool uses the component version.

Why is a space sometimes %20 and sometimes +?

%20 is standard percent-encoding. The + form comes from HTML form submissions (application/x-www-form-urlencoded) and is only valid in a query string, not in a path.

Do I need to encode the whole URL?

No — encoding the whole thing escapes the separators and breaks the link. Encode each parameter value on its own.

Why did decoding fail?

The string contains an invalid escape sequence, such as a % that is not followed by two hexadecimal digits. Check for a literal % that should have been encoded as %25.

Related Developer Tools

More free developer tools that work well alongside url encoder.