Free Online ToolsMFXGJ

URL Encoder

Spaces, ampersands and non-English characters break URLs unless they are percent-encoded. Paste text to encode it safely — choose component mode for query-string values, or full-URL mode to keep : / ? and other structural characters intact.

How to use the URL Encoder

  1. Paste the text or URL.
  2. Leave “component” mode on for query values; switch it off for whole URLs.
  3. Select “Encode” and copy the result.

Formula and method

Each reserved or non-ASCII byte of the UTF-8 encoding is written as % followed by two hex digits. Component mode (encodeURIComponent) also encodes / ? & = and similar characters.

Example

“fish & chips” encodes to fish%20%26%20chips in component mode. Use the “Load example” button above to try it with the sample inputs.

Frequently asked questions

What is the difference between the two modes?

encodeURIComponent is for a single value inside a URL (it encodes everything structural). encodeURI is for a complete URL and preserves its structure.

Is a space %20 or +?

In a URL path or query value built with percent-encoding, %20 is correct. The + form appears in form submissions (application/x-www-form-urlencoded).

Related tools