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
| Code | Meaning |
|---|---|
%20 | A space character. |
%21 | An exclamation mark. |
%22 | A double quote. |
%23 | A number sign. |
%24 | A dollar sign. |
%26 | An ampersand, which separates query parameters. |
%27 | An apostrophe. |
%28 | An opening parenthesis. |
%29 | A closing parenthesis. |
%2B | A plus sign, encoded so it is not read as a space. |
%2C | A comma. |
%2F | A forward slash. |
%3A | A colon. |
%3B | A semicolon. |
%3D | An equals sign. |
%3F | A question mark. |
%40 | An at sign. |
%5B | An opening bracket. |
%5D | A 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':
- 1Type the text.
- 2The encoded string updates live.
- 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
URL Decoder
Decode percent-encoded URLs back to readable text.
Base64 Encoder
Encode any text, including Unicode, to Base64.
JSON Formatter
Format, minify and validate JSON with one click.
Base64 Decoder
Decode Base64 strings back to readable text.
Hash Generator
Generate MD5, SHA-1 and SHA-256 hashes of any text.
Regex Tester
Test regular expressions against text with live matches.