Skip to content

URL Encoder

URL-encode any string so it can live safely in a URL. Spaces, Arabic letters, emoji and reserved characters are converted to percent-encoded form that browsers and APIs accept.

What each field means

Every input below changes the result in a specific way. This is what each one expects, what it starts at, and the range it accepts.

Text to encode

Text that you supply. The calculator works on exactly what you type.

How to read your result

The calculator reports the figures below. The headline figure answers the question in the title; the rows underneath break it down so you can see what drives it.

Encoded URL
This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
Input length
This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
Output length
This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
Characters replaced
This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.
Characters replaced
This figure updates as you change the inputs above. It is a direct output of the formula, not an estimate of future market or lender outcomes.

Quick reference

CodeMeaning
%20A space character.
%21An exclamation mark.
%22A double quote.
%23A number sign.
%24A dollar sign.
%26An ampersand, which separates query parameters.
%27An apostrophe.
%28An opening parenthesis.
%29A closing parenthesis.
%2BA plus sign, encoded so it is not read as a space.
%2CA comma.
%2FA forward slash.
%3AA colon.
%3BA semicolon.
%3DAn equals sign.
%3FA question mark.
%40An at sign.
%5BAn opening bracket.
%5DA closing bracket.
-_.~These stay unescaped because they are URL-safe.

What this means

URLs allow only a small set of characters. Encoding replaces everything else with %XX sequences, so a space becomes %20 and an Arabic letter becomes its UTF-8 bytes.

How we calculate it

Formula

encodeURIComponent(text): every character outside A–Z a–z 0–9 - _ . ! ~ * ' ( ) becomes %XX.

Worked example

Encode 'hello world':

  1. 1Type the text.
  2. 2The encoded string updates live.
  3. 3Paste it into your URL.

Important assumptions

  • Encoding is applied to the whole input, suitable for a query value.

Frequently asked questions

encodeURI vs encodeURIComponent?

encodeURI leaves reserved URL characters intact, while encodeURIComponent encodes almost everything — use it for query values.

Does it support Arabic and emoji?

Yes. Both are encoded to their UTF-8 percent-encoded form automatically.

Related tools