Skip to main content

Calcu.fit

URL Encode Decode – Free Online URL Encoder & Decoder

Use this free URL Encode Decode tool to convert text into URL-encoded format and decode percent-encoded strings into readable text uRL encoding is commonly used in web development, website URLs, search queries, APIs, and online forms. It helps represent special characters safely when data is included in a URL whether you are a developer, website owner, student, or regular internet user, this URL Encoder and Decoder makes it easy to convert URL text without installing additional software.

URL Encode / Decode

Enter your text or URL

0 characters

Result
Encoded URL
Ready to encode

How URL Encoding Works

  1. Enter the URL or text you want to encode or decode.
  2. Select URL Encode or URL Decode.
  3. Choose URL Component or Full URL (URI) encoding.
  4. Click the Calculate button to process your text.
  5. Copy your result and use it wherever needed.

URL Encoding Examples

Original text:
hello world

URL encoded:
hello%20world

Original URL:
https://example.com/search?q=hello world

Encoded URL component:
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world

URL encoding replaces certain characters with percent-encoded representations. For example, a space becomes %20 when encoded as a URL component.

URL Encoding vs URL Decoding

URL Encoding Text → %20
URL Decoding %20 → Space
URL Component encodeURIComponent()
Full URL encodeURI()

URL Component encoding is useful for query parameter values and individual pieces of a URL. Full URL encoding preserves certain URL structure characters such as slashes, colons and question marks.

This tool uses standard JavaScript URI encoding and decoding functions. It processes text directly in your browser and does not require an external encoding service. Invalid percent-encoded sequences will produce an error instead of a result.

How to Use This URL Encode Decode Tool

Follow these simple steps to encode or decode your text:

  1. Open the URL Encode Decode tool.

  2. Enter or paste your text into the input field.

  3. Select Encode to convert special characters into percent-encoded format.

  4. Select Decode to convert encoded text back into readable characters.

  5. Click the relevant conversion button.

  6. Review and copy your result.

For example, encoding the text Hello World! produces Hello%20World! using standard component-style percent encoding.

What You'll See in Your Results

Depending on the calculator’s available features, results may include:

  • Encoded URL: Text converted into percent-encoded format.

  • Decoded URL: Percent-encoded text converted back into readable characters.

  • Special Characters: Characters such as spaces, symbols, and punctuation represented using percent encoding.

  • Input Text: The original text entered into the tool.

  • Output Text: The converted result.

The exact output can depend on whether the tool uses URL component encoding or full URL encoding.

What Is URL Encoding?

URL encoding, also known as percent encoding, is a method of representing characters in a URL using a percent sign (%) followed by two hexadecimal digits.

Some characters are reserved in URLs because they have special meanings. Other characters may need encoding so they can be transmitted or interpreted correctly.

For example:

  • Space can be represented as %20.

  • Exclamation mark can be represented as %21.

  • Ampersand can be represented as %26.

  • Plus sign can be represented as %2B.

  • Question mark can be represented as %3F.

URL encoding is widely used in:

  • Website URLs.

  • Search engine queries.

  • Web forms.

  • API requests.

  • Query parameters.

  • Web application development.

What Is URL Decoding?

URL decoding is the reverse process of percent encoding.

It converts percent-encoded sequences back into their corresponding characters.

For example:

  • Encoded text: Hello%20World

  • Decoded text: Hello World

Another example:

  • Encoded text: name%3DRiaz%26city%3DMultan

  • Decoded text: name=Riaz&city=Multan

Decoding is useful when you need to understand URL parameters, inspect web addresses, or read encoded text received from an application.

URL Encode Decode Formula and Process

URL encoding works by representing a character’s UTF-8 byte value as a percent sign followed by two hexadecimal digits.

For example, a space character has the hexadecimal byte value 20 in ASCII and UTF-8.

Therefore:

[
\text{Space} \rightarrow %20
]

1. Convert Characters Into Bytes

The original text is converted into bytes using an appropriate character encoding, commonly UTF-8.

2. Convert Bytes Into Hexadecimal

Each byte that needs encoding is represented by two hexadecimal digits.

3. Add the Percent Sign

A percent sign (%) is placed before the two hexadecimal digits.

For example:

[
\text{A space byte }20 \rightarrow %20
]

4. Decode the Encoded Text

The decoder reads each valid %HH sequence, converts the hexadecimal value back into a byte, and interprets the resulting bytes using the appropriate character encoding.

URL Encoding Examples

Here are some common examples of URL encoding.

 

Original Character or TextEncoded Result
Space%20
Hello WorldHello%20World
Hello!Hello%21
&%26
+%2B
?%3F
=%3D
#%23
/%2F
@%40

The exact encoding of a complete URL depends on the URL component being encoded. Reserved characters that have a structural purpose may remain unencoded in a complete URL.

URL Decoding Examples

The following examples show how encoded text can be converted back into its original form.

 

Encoded TextDecoded Text
Hello%20WorldHello World
Hello%21Hello!
%26&
%2B+
%3F?
%3D=
%23#
%2F/
%40@

URL Encoding vs. URL Component Encoding

There are different approaches to encoding URL data.

URL Component Encoding

Component encoding is used when encoding an individual part of a URL, such as a query parameter value.

For example:

Hello World & Friends

May become:

Hello%20World%20%26%20Friends

The ampersand is encoded because it should be treated as data rather than as a separator between query parameters.

Full URL Encoding

A complete URL contains structural characters such as colons, slashes, question marks, and ampersands.

These characters may need to remain unchanged when they are part of the URL structure.

For example:

https://example.com/search?q=hello

Should not normally be encoded as one single URL component.

Always choose the correct encoding method for the specific part of a URL you want to encode.

URL Encoding vs. Form Encoding

URL component encoding and HTML form encoding are related but not identical.

One important difference is how spaces are represented:

 

InputComponent EncodingForm Encoding
Space%20+
Plus sign%2B%2B
Ampersand%26%26
Equals sign%3D%3D

In application/x-www-form-urlencoded data, a plus sign commonly represents a space. When decoding this format, literal plus signs are normally represented as %2B.

Common URL Encoding Errors

Some common problems can occur when encoding or decoding URLs.

1. Invalid Percent Sequences

A percent sign should normally be followed by two hexadecimal digits.

For example, %2G is invalid because G is not a hexadecimal digit.

2. Double Encoding

Encoding already encoded text again can produce unexpected results.

For example:

  • Original space:

  • First encoding: %20

  • Second encoding: %2520

This happens because the percent sign itself becomes %25.

3. Incorrect Character Encoding

Text containing Unicode characters should be encoded and decoded using compatible character encoding, commonly UTF-8.

4. Incorrect Space Handling

A space can appear as %20 or as + in form-encoded data. These representations should not be treated as interchangeable in every URL context.

5. Encoding an Entire URL Incorrectly

Encoding an entire URL as one component may change structural characters and make the URL unusable.

Why Is URL Encoding Important?

1. Web Development

Developers use URL encoding to safely include user input and special characters in web addresses.

2. API Communication

APIs frequently use URL-encoded query parameters to transfer search terms, identifiers, and other information.

3. Search Queries

Search terms may contain spaces and special characters that need appropriate encoding before being included in a URL.

4. Online Forms

Form submissions may use percent encoding to represent special characters and spaces.

5. Website Compatibility

Correct encoding helps web applications handle characters that might otherwise conflict with URL syntax.

6. Debugging URLs

Developers can decode URL parameters to understand the information being passed between pages and applications.

Is URL Encoding the Same as Encryption?

No. URL encoding is not encryption.

 

URL EncodingEncryption
Converts characters into a URL-compatible representationProtects information using cryptographic methods
Does not require a secret keyUses cryptographic keys
Can be reversed without a passwordRequires the appropriate decryption key
Used for URL formatting and data transferUsed for information security
Does not provide confidentialityCan provide confidentiality when correctly implemented

Important: Never use URL encoding to protect passwords, financial details, or confidential information. Encoding changes how data is represented but does not make it secret.

Frequently Asked Questions (FAQ)

What is a URL Encode Decode tool?

A URL Encode Decode tool converts text into percent-encoded format and decodes encoded text back into readable characters.

%20 represents a space character in percent encoding

URL encoding helps represent special characters and data safely inside URL components, query parameters, and web requests.

URL encoding converts characters into percent-encoded sequences. URL decoding converts those sequences back into their corresponding characters.

No. URL encoding represents characters using percent-encoded byte values, while Base64 converts binary data into a text representation using a different character set.

 In form-encoded data, commonly using application/x-www-form-urlencoded, spaces are represented by plus signs. Standard percent encoding commonly represents spaces as %20.

%2F represents a forward slash character (/). It may be used when a slash needs to be treated as data instead of a URL path separator.

Yes. URL encoding can represent Unicode characters by encoding their UTF-8 bytes as percent-encoded sequences

Double URL encoding happens when already encoded text is encoded again. For example, %20 becomes %2520 because the percent sign is encoded as %25.

Yes. You can use this URL Encode Decode tool for free without purchasing additional software.

Disclaimer

This URL Encode Decode tool is provided for general text conversion, web development, and educational purposes. Encoding behavior can vary depending on whether the input is a complete URL, an individual URL component, or form-encoded data always verify encoded output before using it in an application or API request. URL encoding is not encryption and should not be used as a security method.