Skip to content
Calculator Tools
Developer Tools

URL Encoder

Percent-encode text for use in a URL path, query string or form body.

Enter values

Results update as you type.

Result

Encoded

search%20query%20with%20spaces%20%26%20symbols%3Dyes

Use component encoding for a value inside a query string; full-URI encoding keeps the structural characters intact.

Original length
38
Encoded length
52
Characters escaped
7
Safe for
A single query value or path segment

About the URL Encoder

Percent-encode text for use in a URL path, query string or form body.

Also known as: percent encode, encode url, uri encoder, query string encoder.

How to use this calculator

  1. Enter text to encode, encoding.
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Review the breakdown shown under the main result.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Formula

Unsafe bytes become %XX in hexadecimal

Worked example

Using the values pre-filled in the calculator above:

  • Text to encode: search query with spaces & symbols=yes
  • Encoding: Component (encodeURIComponent)

the calculator returns:

  • Encoded: search%20query%20with%20spaces%20%26%20symbols%3Dyes
  • Original length: 38
  • Encoded length: 52
  • Characters escaped: 7