URL Encoder / Decoder

Encode and decode URL components.

URL Encoder / Decoder

URL encoding, also known as percent-encoding, converts characters that are not allowed in a URL into a safe format that can be transmitted over the internet. Special characters such as spaces, ampersands, equal signs, and non-ASCII letters are replaced by a percent sign followed by their two-digit hexadecimal code. This is essential when building query strings, constructing API requests, or handling form submissions that include user-typed text. Use this tool to quickly encode a value before inserting it into a URL, or to decode an encoded string back to a readable form.

URL encoding explained

Why URLs need encoding

A URL may only contain a limited set of ASCII characters. Spaces, non-English letters and characters with a special meaning, such as ampersand, question mark, hash and slash, must be replaced with a percent sign followed by two hexadecimal digits. A space becomes %20 and an ampersand becomes %26. Without encoding, a value containing & would be misread as the start of a new query parameter.

Typical examples

The search phrase "rock & roll" becomes rock%20%26%20roll when placed in a query string. A redirect target like https://example.com/a?b=1 passed as a parameter must be fully encoded, otherwise its own question mark and equals sign will break the outer URL. Accented text such as "café" is first converted to UTF-8 bytes and then percent-encoded as caf%C3%A9.

Encode components, not whole URLs

Encode each value separately before joining it into the URL. Encoding an entire URL also escapes the colons and slashes that structure it, producing an unusable address. Decoding is the reverse operation and is helpful for reading long tracking links or log entries.

Plus signs and spaces

In HTML form submissions a space is sometimes written as a plus sign. A literal plus inside a value should therefore be encoded as %2B. If decoded text shows unexpected plus signs or spaces, this difference is usually the cause.

How to use

  1. Choose Encode to make a value safe for use in a URL, or Decode to read an already-encoded string.
  2. Paste the value into the input field — for example a search term, a redirect URL, or a query-string parameter.
  3. Copy the encoded or decoded result and drop it into your link or API request.
  4. Encode individual values rather than a whole URL, so that the slashes and question marks that structure the URL are preserved.

Frequently asked questions

What is the difference between encoding a value and a whole URL?

A full URL contains structural characters like : / ? & that should stay as-is. You normally encode only the individual values you insert into a URL — such as a single query parameter — so those structural characters are not mangled.

Why do spaces become %20 or +?

Spaces are not allowed in URLs, so they are percent-encoded as %20. In the query string of some forms, spaces are encoded as +. Both decode back to a normal space.

Is any data sent to your servers?

No. Encoding and decoding run locally in your browser.