Encode / Decode

Encoded Output

Common Encodings Reference

Character Encoded Description
Advertisement
Advertisement

📖 How to Use

  1. Select Encode or Decode from the tabs.
  2. Paste your URL or text into the input field.
  3. The result appears instantly.
  4. Click Copy to copy the output.

❓ Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts special characters (spaces, &, =, ?, etc.) into % + hex code format so they can be safely used in URLs.

When do I need to URL encode?

When passing special characters in query strings, building API requests, creating redirects, or handling user input that goes into a URL.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes the entire URL (preserving / : ? =). encodeURIComponent encodes a single parameter value and converts all special chars including /and ?.

Can I decode a URL with %20 and similar codes?

Yes — paste the encoded URL into the decode tab and it converts %20 → space, %3D → =, %26 → & and all other percent-encoded characters.

Does this support base64 URL encoding?

This tool handles standard percent-encoding. For Base64 encoding/decoding, use our Base64 tool.

URL Encoder and Decoder — Safe URL Construction for Developers and Marketers

URLs (Uniform Resource Locators) are subject to a strict character set defined by RFC 3986. Only a small subset of ASCII characters — letters, digits, and a handful of punctuation marks — are allowed in URLs without encoding. Every other character must be "percent-encoded": replaced with a % sign followed by the character's two-digit hexadecimal ASCII code. A space becomes %20, a # becomes %23, an ampersand (&) in a query value becomes %26.

This encoding requirement creates two common developer and marketer tasks: (1) encoding a string that contains special characters before inserting it into a URL query parameter, and (2) decoding a URL-encoded string to see its human-readable content. This tool handles both directions instantly.

Why URL Encoding Is Necessary

URLs have structural characters that carry special meaning:

Character Structural Meaning in URLs Encoded Form (when used as data)
& (ampersand)Separates query parameters%26
= (equals)Separates key from value%3D
? (question mark)Starts query string%3F
# (hash)Fragment identifier (anchor)%23
(space)Invalid in URLs%20 (or + in form data)
/ (slash)Path separator%2F

If a search query contains "&" (as in "AT&T") and it's inserted into a URL parameter without encoding, the URL parser treats the & as a parameter separator and splits the query incorrectly. Encoding to "AT%26T" makes the intent unambiguous.

encodeURIComponent vs encodeURI: The Key Distinction

JavaScript has two URL encoding functions with importantly different scopes:

This tool's "Encode for Query Parameter" mode uses encodeURIComponent behaviour. "Encode Full URL" mode uses encodeURI behaviour.

Who Uses URL Encoding

Frequently Asked Questions

What is the difference between %20 and + for encoding spaces?

Both represent a space, but in different contexts. %20 is the standard percent-encoding for a space in any URL context. The + character is used to represent a space specifically in application/x-www-form-urlencoded format (HTML form data submitted via POST or as query strings). Modern servers typically accept both, but %20 is the safer, standards-compliant choice for URLs.

Why do some URLs contain characters like %E2%80%99?

These are percent-encoded UTF-8 characters. %E2%80%99 is the UTF-8 encoding of the right single quotation mark (') — a common character in English text that's not in basic ASCII. Modern browsers display these decoded in the address bar, but the underlying URL uses the percent-encoded form. Use the decoder to see the human-readable character.

Can I encode Urdu or Arabic text in a URL?

Yes — Urdu and Arabic text (Unicode) can be included in URLs through percent-encoding of their UTF-8 byte sequences. This produces long strings like %D8%A7%D9%84%D8%B3%D9%84%D8%A7%D9%85 for "السلام". Modern browsers display the decoded Urdu text in the address bar. This is fully supported for IDN (Internationalised Domain Names) and query parameters.

What is double URL encoding and when does it cause problems?

Double encoding occurs when an already-encoded string is encoded again — % becomes %25, turning %20 into %2520. This causes servers and parsers to receive the literal string "%20" instead of a space, breaking parameter parsing. Common cause: encoding a full URL that already contains encoded characters. Always decode first before re-encoding, or use the "decode then encode" option in this tool.

How do I build a properly formatted UTM URL?

A UTM URL looks like: https://yoursite.com/page?utm_source=facebook&utm_medium=paid_social&utm_campaign=ramadan_sale_2025. Each parameter value should be URL-encoded if it contains spaces or special characters. For "Ramadan Sale 2025", encode as "Ramadan%20Sale%202025" or use hyphens instead (recommended practice: "ramadan-sale-2025" — lowercase, hyphens, no spaces). This avoids encoding issues entirely.