20
1

URL Encode

Egor VolchenkoEgor Volchenko
CreatedNov 9, 2026
UpdatedNov 9, 2026

URL Encode converts a text value into a percent-encoded URL component using UTF-8 bytes. Use this percent encoder for a query parameter value or an individual path segment. Spaces become %20, and literal plus signs become %2B.

1
1

How to use URL Encode

Follow these steps to check the input and read the result.

Encode a value for a URL

  1. Type or paste the unencoded component or text value into URL / String.
  2. Leave Input Encoding: at UTF-8. The current URL operation uses the entered text directly; this selector does not reinterpret Hex or Base64 input.
  3. Keep Auto / Live on to update the result as you edit. To process it manually, turn Auto / Live off and click Run.
  4. Read URL Encoded (Percent-encoded) and check the result before using it.
  5. Click Copy to copy the result. Use Clear where shown, or a field’s clear control, to clear the text before starting again.

Enter hello world+! to get hello%20world%2B%21. The space, plus sign, and exclamation mark each receive a percent escape.

Encode a value before assembling the address

Reserved delimiters such as slash, question mark, ampersand, and equals are escaped. Encoding a complete address therefore also escapes its structure. Use the result for the component you intended to encode rather than assuming it remains a navigable URL.

Avoid encoding an already encoded value

A percent sign becomes %25. Entering %20 produces %2520, which is a second layer of encoding. The operation uses RFC 3986-style component escaping, including punctuation such as ! and *.

Frequently asked questions

This operation uses percent encoding for URL components. The + convention for spaces belongs to form-urlencoded data, which is a different representation.

API — Percent Encoder

Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.

No API Key Required 60 req/min
https://million.tools/api/v1/run/url-encode

Request Parameters (JSON / Form Data)

  • start (or input)

    URL / String

    Type: string Default: —
  • input_encoding

    Input Encoding

    hex hex_ignore_non_hex base64 utf-8 utf-16le utf-16be windows-1251 windows-1252
    Type: string Default: utf-8
bash — cURL
curl -X POST https://million.tools/api/v1/run/url-encode \
  -H "Content-Type: application/json" \
  -d '{"start":"a+b /?=hello world!"}'
const response = await fetch('https://million.tools/api/v1/run/url-encode', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "start": "a+b /?=hello world!"
  }),
});

const data = await response.json();
console.log(data.result);
import requests

response = requests.post(
    'https://million.tools/api/v1/run/url-encode',
    json={
        "start": "a+b /?=hello world!",
    },
    timeout=15,
)

data = response.json()
print(data['result'])
$ch = curl_init('https://million.tools/api/v1/run/url-encode');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'start' => 'a+b /?=hello world!',
    ]),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

echo $response['result'] ?? '';
{
    "status": "success",
    "tool": "url-encode",
    "service": "url_encode",
    "result": "a%2Bb%20%2F%3F%3Dhello%20world%21",
    "results": {
        "result": "a%2Bb%20%2F%3F%3Dhello%20world%21"
    }
}
Egor Volchenko
Egor Volchenko Developer & Author

Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience.

Published:
Updated:

Ratings & feedback 0

Share your experience with this tool.

Leave feedback

Your rating (optional)

Select a rating

Write a review, leave a rating, or do both.

Your email stays private.

No feedback yet

Be the first to leave a review or rating.