TheTools.World tool

URL encoder / decoder online

Encode text into percent-encoded (URL-safe) form, or decode percent-encoded text back into readable text. Useful for building query strings, debugging URLs, and reading encoded links.

Encode or decode a URL

Encode text into percent-encoded (URL-safe) form, or decode percent-encoded text back into readable text. Useful for building query strings, debugging URLs, and reading encoded links.

How to encode or decode a URL

  1. Paste the text or URL you want to encode, or the percent-encoded text you want to decode.
  2. Choose Encode or Decode.
  3. Choose component mode if you're encoding a single query parameter value (recommended for most uses), or turn it off to encode a full URL while leaving : / ? & = characters intact.
  4. Click Run.
  5. Copy the result into your URL, code, or query string.

Component encoding (encodeURIComponent) escapes characters like & = ? / : that have special meaning in a URL, which is what you want for a single value being placed inside a query string. Full-URL encoding (encodeURI) leaves those characters alone since they're structurally meaningful in a complete URL.

What URL encoding is and how the two modes differ

URL (percent) encoding replaces characters that aren't safe in a URL — spaces, ampersands, non-ASCII letters, and others — with a percent sign followed by their hex code, like a space becoming "%20". Component mode encodes aggressively, escaping characters like & = ? / : # ; that have structural meaning in a URL, which is correct when you're encoding one value to insert into a query string. Full-URL mode encodes less aggressively, leaving those structural characters alone because a full URL needs them intact to remain a valid, working URL.

Best practices

Common mistakes to avoid

Real-world use cases

Limitations

This tool encodes and decodes standard percent-encoding as implemented by your browser's built-in encodeURIComponent/decodeURIComponent and encodeURI/decodeURI functions. It does not validate that a URL is otherwise well-formed, and decoding will fail with an error if the input contains invalid percent-encoding sequences (like a stray % not followed by two hex digits).

Privacy

Text you encode or decode is processed locally in your browser. It is not sent to a server, logged, or stored. See the privacy policy for the site's full data handling approach.

Troubleshooting

Conclusion

Use component mode to encode a single value for a query string, and full-URL mode when you have a complete URL and only want unsafe characters escaped. For encoding text into Base64 instead of percent-encoding, see Base64 encoder / decoder.

FAQ

What's the difference between component and full-URL encoding?

Component encoding escapes structural URL characters like & = ? / so a single value is safe to insert into a query string. Full-URL encoding leaves those characters intact since a complete URL needs them to remain valid.

Why did decoding fail with an error?

Decoding fails if the input contains invalid percent-encoding, such as a % character not followed by two valid hexadecimal digits.

What does %20 mean?

%20 is the percent-encoded form of a space character. Some encoders use + instead of %20 for spaces in query strings specifically; this tool uses the standard %20 form.

Is my text uploaded anywhere?

No. Encoding and decoding happen locally in your browser using built-in browser functions, and your text is not sent to a server.