URL encoder/ decoder

Use our URL encode online tool to encode text and decode URLs for free. Convert special characters into readable formats. Try it now.

Free Runs in your browserNo sign-up

URL encoder/ decoder tool

Waiting for input
Empty
Empty

Need to encode a URL or turn an encoded string back into readable text? This free URL encode online tool makes both tasks simple. Paste your text, choose the right conversion, and get your result in seconds. It runs in your browser, so nothing you enter is uploaded or stored.

What Does a URL Encoder and Decoder Do?

A URL encoder converts certain characters into a format that can be used safely in web addresses. This process is called percent encoding. It replaces a character with a percent sign (%) followed by two hexadecimal digits.

For example, a space becomes %20, an ampersand (&) becomes %26, and a question mark (?) becomes %3F when encoded as part of a URL component.

A URL decoder reverses this process. It changes encoded characters back into their original form, making a URL or text string easier to read. You can use the same URL encoder decoder tool for both tasks.

How to Use the URL Encode Online Tool

You don't need coding skills or extra software. Follow these steps to convert your text:

  1. Open the URL encoder and decoder tool.
  2. Paste or type your text, URL, or query parameter value into the input box.
  3. Choose the encoding or decoding operation.
  4. Review the converted result in the output area.
  5. Copy the result and use it in your code, web address, or project.
  6. Clear the input when you want to process another string.

For encoding, check that you selected the correct mode for your input. For decoding, make sure the percent signs are followed by valid hexadecimal characters.

How Does URL Encoding Work?

URLs have a defined structure. Some characters have special meanings within that structure. For example, a question mark starts a query string, an ampersand separates query parameters, and a hash mark introduces a fragment.

When these characters appear as ordinary data inside a URL component, they may need encoding. Percent encoding represents each character using its encoded byte value. For non-ASCII text, UTF-8 is commonly used before the bytes are converted into hexadecimal values.

There isn't one formula that replaces every character with the same pattern. The conversion depends on the character's byte representation and the URL context.

Common URL-Encoded Characters

Here are some characters you'll often see when working with encoded URLs:

Original characterEncoded valueDescription
Space%20Space character
!%21Exclamation mark
#%23Hash mark
$%24Dollar sign
%%25Percent sign
&%26Ampersand
+%2BPlus sign
/%2FForward slash
:%3AColon
=%3DEquals sign
?%3FQuestion mark
@%40At sign
'%27Apostrophe

URL Encoding Examples: Before and After

Let's look at a few practical examples. These show how common text and query parameter values change during URL encoding.

Original textEncoded text
Hello WorldHello%20World
John & JaneJohn%20%26%20Jane
price=25&type=bookprice%3D25%26type%3Dbook
[email protected]hello%40example.com
What is URL encoding?What%20is%20URL%20encoding%3F

For example, imagine you're adding the search value red shoes & boots to a URL. If you place it directly after q=, the ampersand could be treated as a separator between query parameters.

Encoding the value gives you red%20shoes%20%26%20boots. The complete query can then look like this:

https://example.com/search?q=red%20shoes%20%26%20boots

The browser or server can now read the search value without treating its ampersand as a parameter separator.

Encoding a Full URL vs. a URL Component

These two operations aren't the same. A full URL contains structural characters such as colons, slashes, question marks, and ampersands. Encoding those characters without considering their role can change how the address works.

For example, when you encode a complete URL with a component encoder, its slashes and punctuation may also become encoded. That's useful when the entire URL is being passed as a value inside another URL, but it's usually not what you want when creating a normal web address.

JavaScript provides separate functions for these tasks:

  • encodeURIComponent(): Encodes an individual URL component, such as a search term or parameter value.
  • decodeURIComponent(): Decodes an encoded URL component.
  • encodeURI(): Encodes a complete URI while preserving its structural characters.
  • decodeURI(): Decodes a URI while preserving reserved characters that have special meaning.

For most query parameter values, encodeURIComponent() is the appropriate choice. Use a full-URL method when you need to preserve the structure of the address.

Practical Tips and Common URL Encoding Mistakes

  • Don't encode everything blindly: Encode individual values rather than the entire URL when building query strings.
  • Watch out for plus signs: A plus sign may represent a space in form-encoded data, but it can also be a literal plus character. Its percent-encoded form is %2B.
  • Check existing encoding: Encoding an already encoded value can produce double encoding. For example, %20 can become %2520.
  • Use valid percent sequences: Each percent sign must be followed by two hexadecimal digits. Invalid sequences may cause decoding errors.
  • Handle non-English text: UTF-8 percent encoding supports characters from many writing systems.
  • Don't confuse encoding with encryption: URL encoding changes how characters are represented. It doesn't hide information or protect sensitive data.

Who Uses a URL Encoding Tool?

Web developers and programmers use URL encoding when building links, handling API requests, and processing query parameters. It helps them avoid problems caused by special characters in user input.

SEO professionals and digital marketers may use a URL decoding tool to inspect tracking links, campaign parameters, and encoded landing page URLs. It can also help them check links before adding them to marketing campaigns.

Students and everyday internet users can use it to understand encoded web addresses or convert text without writing code. Since this tool works directly in your browser, you can use it for free without creating an account or installing software.

Use the URL encode online tool whenever you need to prepare URL values or read percent-encoded text. Paste your content, choose the conversion, and copy the result when it's ready.

Frequently Asked Questions

What is URL encoding?

URL encoding, also called percent encoding, converts certain characters into a format that can be used safely in URLs. It represents each encoded byte with a percent sign followed by two hexadecimal digits. For example, a space is commonly represented as %20.

How can I encode a URL online?

Paste your text or URL component into an online URL encoder. Choose the encode option and review the converted result. Copy the output when you're ready to use it.

How do I decode an encoded URL online?

Paste the percent-encoded text into a URL decoder and select the decode option. The tool converts valid encoded sequences back into readable characters. Invalid percent sequences may cause a decoding error.

What does %27 mean in a URL?

%27 is the percent-encoded representation of an apostrophe ('). You'll often see it in URLs when an apostrophe appears as part of a parameter value or other URL component.

What is the difference between encodeURI() and encodeURIComponent()?

encodeURI() is designed for a complete URI and preserves characters that define its structure. encodeURIComponent() encodes an individual component, including characters such as &, =, and ?. Use the component function for most query parameter values.

Is URL encoding the same as encryption?

No. URL encoding changes the representation of characters so they can be used in a URL. It doesn't encrypt or protect the information. Don't use it to hide passwords or other sensitive data.

Was this tool helpful?

Related Tools