URL Encoder / Decoder

Encode or decode URLs and query strings (percent-encoding), see every part of a URL and edit its query parameters in a table.

URLs can only contain a limited set of characters, so spaces, accents, emoji and symbols like & or ? must be written as percent-escapes such as %20. This tool encodes text for a URL and decodes escaped URLs back into readable text.

Paste a full URL and you also get its parts — protocol, host, path, fragment — and a table of its query parameters that you can edit, add or remove; the URL is rebuilt and encoded correctly for you. It all runs in your browser.

How to use URL Encoder / Decoder

  1. Choose Encode or Decode.
  2. Type or paste your text or URL. The result appears instantly.
  3. When encoding, pick Component (a single value), Full URL (keeps : / ? & =) or Form (spaces as +).
  4. For a full URL, edit the query parameters in the table below and copy the rebuilt URL.

Features

  • Three encodings: URL component (RFC 3986), full URL (encodeURI) and HTML form data (+ for spaces).
  • Decodes %XX escapes and, optionally, + as a space.
  • Pinpoints malformed escapes, such as a lone % or broken UTF-8, with their position.
  • UTF-8 throughout: accents, emoji and every language.
  • URL breakdown: protocol, user, host, port, path and fragment.
  • Editable query parameter table — add, change or remove parameters and get a correctly encoded URL.
  • Private: nothing is sent to a server.

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are not allowed or have a special meaning in a URL with a % followed by two hexadecimal digits — the bytes of the character in UTF-8. A space becomes %20, & becomes %26 and é becomes %C3%A9.

Without encoding, a value such as “Tom & Jerry” would break a query string, because & separates parameters.

CharacterEncodedWhy it needs encoding
space%20 (or + in forms)Not allowed in URLs
&%26Separates query parameters
=%3DSeparates a name from its value
?%3FStarts the query string
#%23Starts the fragment
/%2FSeparates path segments
%%25Starts an escape itself
é%C3%A9Non-ASCII: its UTF-8 bytes

Component vs full URL vs form encoding

Use Component when you encode one piece that goes inside a URL — a search term, a query value or a path segment. It encodes everything except letters, digits and - _ . ~. Use Full URL when you have a complete address and only want to fix spaces and non-ASCII characters while keeping : / ? # & = working. Use Form for data in the application/x-www-form-urlencoded format sent by HTML forms, where spaces become +.

InputComponentFull URLForm
a b&ca%20b%26ca%20b&ca+b%26c
https://x.com/?q=1https%3A%2F%2Fx.com%2F%3Fq%3D1https://x.com/?q=1https%3A%2F%2Fx.com%2F%3Fq%3D1
cafécaf%C3%A9caf%C3%A9caf%C3%A9

%20 or +?

Both can mean a space, but in different places. In the path of a URL a space must be %20. In query strings submitted by HTML forms, a space is usually written as +, and a real plus sign must then be %2B. When decoding, tick “Treat + as space” for form data and query strings; untick it for paths and other text where + is a real plus.

Parts of a URL

A URL such as https://[email protected]:8080/search/shoes?color=red&size=42#reviews has a protocol (https), optional user, host (shop.example.com), port (8080), path (/search/shoes), query string (color=red&size=42) and fragment (reviews). Paste any URL to see its parts and edit the query parameters.

Frequently asked questions

Is the URL encoder free and private?

Yes. It is free, and everything runs in your browser — the text and URLs you paste are never sent anywhere.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a whole URL and leaves the characters that give a URL its structure (: / ? # & =) alone. encodeURIComponent encodes a single value and escapes those characters too. Choose Full URL or Component accordingly.

Why does decoding fail with “not a valid escape”?

A % in the text is not followed by two hex digits — for example “100%” or “%G1”. A literal percent sign must be written as %25. The message shows the exact position.

Why do I see %C3%A9 instead of é?

Non-ASCII characters are encoded as their UTF-8 bytes; é is two bytes, C3 and A9. Decoding turns them back into é.

Should spaces be %20 or +?

Use %20 in paths and in most APIs. HTML forms and many query strings use +. Choose Form to encode spaces as +, and “Treat + as space” when decoding form data.

Can I edit query parameters?

Yes. Paste a full URL and the parameters appear in a table. Change names or values, add or remove rows, and copy the rebuilt URL — values are encoded correctly for you.

Related tools