HandyTools Hub
← Back

URL Encoder/Decoder

Encode or decode URLs and URL parameters. Fast, private, and easy to use.

Try it with a real URL value

Encode a query value, not the full URL

Query value

red & blue

Encoded value

red%20%26%20blue

Choose the correct encoding scope

Encode a parameter value with encodeURIComponent. Encoding an entire URL changes its separators.

Read the URL encoding guide

URL Encoder converts text into a form that is safe to embed in URLs, and decodes percent-encoded strings back into readable text. Paste a query string with Chinese characters, an ampersand, or a stray space, and get a valid, copy-paste-ready result. It is essential for web developers building links, API calls, and tracking URLs.

How to Use

  • Enter URL: Type or paste your URL or text into the input field.
  • Encode or Decode: Click Encode to make it URL-safe, or Decode to read an encoded string.
  • View result: The output updates instantly.
  • Copy: Copy the result to your clipboard with one click.

Features

  • Encode URLs for safe transmission
  • Decode percent-encoded URLs back to readable text
  • Full Unicode support, including emoji and CJK characters
  • One-click copy to clipboard
  • Runs locally in your browser

What is Percent-Encoding?

URLs were originally designed around a limited ASCII character set. Characters outside that set — and reserved characters with special meaning, like ?, &, =, and # — must be encoded as a percent sign followed by the character’s hexadecimal byte value. Non-ASCII text goes through UTF-8 first: the Chinese character 中 becomes %E4%B8%AD, one percent-encoded triplet per UTF-8 byte.

The most common bug in this area is double-encoding, where %20 gets encoded again into %2520. It happens when an already-encoded string passes through an encoder a second time — for example in a redirect chain or a template that encodes automatically. Another frequent confusion is the plus sign: it means a space inside query strings, but is a literal + in path segments. Knowing which part of the URL you are working with tells you which rule applies.

Use Cases

  • Encoding query parameter values that contain &, =, or spaces
  • Building share links and UTM-tagged marketing URLs
  • Decoding percent-encoded URLs found in logs and analytics
  • Preparing non-ASCII text for use in links
  • Debugging double-encoding issues in redirects

Frequently Asked Questions

What is URL encoding?

URL encoding replaces unsafe ASCII characters with percent-encoded values.

Why do spaces become %20?

Spaces are not allowed in URLs, so they're encoded as %20 to make the URL valid.

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves URL structural characters like ? and & intact; encodeURIComponent encodes them too, which is what you want for query parameter values.

Why does + sometimes mean a space?

In query strings (form-encoded data), + represents a space. In URL path segments it is a literal plus sign.