Skip to content
utilnest

URL encoder and decoder

Percent-encode text for URLs, decode it back, and break a query string into readable parameters.

  • Works in your browser
  • No sign-up
  • Free to use

How to use URL encode & decode

  1. 1

    Choose Encode or Decode.

  2. 2

    For encoding, choose whether the input is a single value (encodeURIComponent) or a whole URL (encodeURI).

  3. 3

    Type or paste your text. The result updates as you type, and any malformed escape is pointed out.

  4. 4

    If the input is a URL with a query string, check the breakdown table below for each key and its decoded value.

What this tool does

Percent-encoding (RFC 3986) replaces characters that aren't allowed or have special meaning in a URL with % and two hex digits. This tool encodes text so it is safe to put in a link, decodes escaped links back into readable text, and explains the parts of a URL.

Features

  • Two encoding modes that match JavaScript's encodeURIComponent and encodeURI.
  • Form encoding. Spaces as + when encoding, and + as space when decoding.
  • Strict UTF-8 decoding that reports the position of a bad % escape or invalid byte sequence.
  • Query string breakdown. Protocol, host, path, fragment, and a table of every parameter, with decoded keys and values. Keys without a value and malformed values are marked.
  • Swap the output into the input to reverse the conversion.

Limits

  • The breakdown needs an absolute URL (with https:// or another scheme) or a bare query string such as a=1&b=2. It isn't shown for text with spaces.
  • Repeated keys are listed in order; nothing is merged.
  • International domain names are shown as entered, not converted to Punycode.

Where your text is processed

This tool works in your browser: what you type or paste is processed on your own device, so it isn't sent to our server for this tool. Some other tools on UtiloNest do use our server, and their pages say so.

Frequently asked questions

When should I use encodeURIComponent and when encodeURI?

Use encodeURIComponent for one piece of a URL, such as a search term or a redirect address inside a query parameter. It also encodes the characters & = ? / and the hash sign, so they can't change the URL's structure. Use encodeURI only for a complete URL you want to make safe, because it leaves those structural characters alone.

Why is a space sometimes %20 and sometimes +?

In URLs, a space is %20. HTML forms submitted with the GET method use an older format in which a space becomes +. When encoding, you can choose + for spaces; when decoding, "Treat + as a space" is on by default because most query strings come from forms. Turn it off if a literal + must stay.

What does "malformed escape" mean?

Every % must be followed by two hexadecimal digits, such as %2F. A lone % or something like %G1 is invalid, and so is a sequence of escapes that isn't valid UTF-8, such as a truncated emoji. The decoder shows the position and the exact sequence instead of failing silently.

How are non-English characters encoded?

Characters outside ASCII are first converted to UTF-8 bytes, and each byte becomes a %XX escape. For example, é becomes %C3%A9 and an emoji becomes four escapes. Decoding reverses this exactly.

Where is my text processed?

In your browser. This tool works on your own device, so what you type isn't sent to our server for it.

Was this tool helpful?