Skip to content
TelugupalakaAITelugupalakaAI

URL Encoder / Decoder

Percent-encode text for safe use in URLs, decode encoded strings back to readable text, and break any URL down into its protocol, host, path and query parameters.

  • Runs in your browser
  • Free, no sign-up
  • No uploads

Input

0 chars0 lines0 B

Output

 

What is URL Encoding?

A URL (Uniform Resource Locator) is the web address you type into your browser to visit a website. The internet dictates very strict rules about what characters are allowed in a URL.

According to the official RFC 3986 specification, a URL can only contain standard ASCII alphanumeric characters (A-Z, a-z, 0-9) and a small handful of special characters like -, _, ., and ~.

If your URL needs to contain data with spaces, emojis, or reserved characters like ? or &, that data must be translated into a safe format. This translation process is called URL Encoding (or Percent-Encoding).

How Percent-Encoding Works

When a URL encoder detects an unsafe character, it replaces that character with a % followed by its two-digit hexadecimal equivalent.

For example:

  • A space becomes %20
  • An exclamation mark ! becomes %21
  • An ampersand & becomes %26

If you try to pass an ampersand & in a URL parameter without encoding it, the web server will think you are trying to start a brand new parameter, completely breaking your application logic.

When Do You Need to Encode?

You primarily need URL encoding when you are working with query parameters. For example, if you are building a search feature and the user searches for "Shoes & Socks", the URL should look like this: https://example.com/search?q=Shoes%20%26%20Socks

If you fail to encode the string, the URL will look like ?q=Shoes & Socks. The server will see q=Shoes and assume Socks is a completely different, broken variable.

The Danger of Double Encoding

A common mistake among junior developers is "Double Encoding." If you pass the string Hello World through an encoder, it becomes Hello%20World. If you accidentally pass it through the encoder a second time, the encoder will see the % symbol and encode it as %25, resulting in Hello%2520World. This will break your decoding logic on the backend.

Our URL Encoder / Decoder tool allows you to instantly verify exactly what your strings look like before and after encoding, running 100% safely in your local browser.

How to use the URL Encoder / Decoder

  1. 1

    Paste text or a URL into the input.

  2. 2

    Choose Encode or Decode and the encoding mode.

  3. 3

    Copy the result or inspect the parsed URL parts below.

Features

Component or full URL
Use encodeURIComponent for values or encodeURI for complete URLs.
URL inspector
See the protocol, host, path, hash and every query parameter in a table.
Plus-as-space
Optionally treat + as a space when decoding form data.
Live conversion
Output updates as you type.

Frequently asked questions

When should I use component encoding?

Use component encoding for individual query values or path segments. It encodes reserved characters like &, = and / that would otherwise change the URL's meaning.

Why do I get a 'malformed URI' error?

Decoding fails when a % sign isn't followed by two valid hex digits. Check for stray % characters in your input.

Are my URLs uploaded to a server?

No. All processing happens locally in your browser using JavaScript and WebAssembly. Your URLs never leave your device, and nothing is stored or logged.