Tools marked “Coming soon” are being built now.

Developer tools
Developer · Free · Private

URL Encoder / Decoder

Encode, decode and take apart web addresses, with errors that tell you exactly what is wrong.

  • Runs in your browser
  • No upload
  • No sign-up
Choose a job
Direction

About this tool

Web addresses can only carry a small set of characters, so spaces, accents, emoji and symbols such as & and ? are written as percent codes: a space becomes %20 and “é” becomes %C3%A9. This tool converts in both directions as you type. In Auto mode it looks at what you pasted and picks the direction for you, and it notices when something was encoded twice, such as %2520, and offers to decode it again.

You choose how much gets encoded: a single value for a query string (encodeURIComponent), a whole address that must keep its slashes and question mark (encodeURI), or strict RFC 3986 encoding for APIs and OAuth signatures. Form-style “+” for spaces is one tick away. When a code is broken, such as a lone % or bytes that aren’t valid UTF-8, you get a plain sentence saying which character is wrong and a button that selects it.

“Take a URL apart” splits an address into protocol, host, port, path, fragment and every query parameter, decoded and editable in a table, and rebuilds the link as you change it. A third tab encodes and decodes HTML entities like & and é. Nothing you paste is sent anywhere.

How to use URL Encoder / Decoder

  1. Pick a job at the top: “Encode / Decode”, “Take a URL apart” or “HTML entities”.
  2. For encoding, paste into “Text or URL”. Leave the direction on “Auto”, or choose “Encode” or “Decode” yourself.
  3. Choose what you are encoding under “Encode as”, and tick “Spaces as +” if the result goes into a form-style query string.
  4. Copy the result, or press “Swap” to send it back the other way.
  5. To edit a link, open “Take a URL apart”, paste the address, then change any part or parameter. “Add parameter” adds a row and the bin icon removes one.
  6. Copy the rebuilt link with “Copy”, or the parameters with “Copy as JSON”.
Example

Encoding “fish & chips” as part of a URL gives fish%20%26%20chips; with “Spaces as +” it becomes fish+%26+chips. Decoding search?q=caf%C3%A9 gives search?q=café.

Features

  • Encode and decode live as you type, with automatic direction detection.
  • Three encoding levels: part of a URL (encodeURIComponent), whole URL (encodeURI) and strict RFC 3986.
  • Optional + for spaces when encoding, and + read as a space when decoding.
  • Plain-English errors for broken % codes and invalid UTF-8, with a “Show me” button that selects the problem.
  • Double-encoding check with a one-tap “Decode again”.
  • URL breakdown into protocol, host, port, path, user name and password (when present) and fragment, all editable.
  • Query parameters in an editable table that keeps their order and repeated names, rebuilt into the link instantly.
  • Parameters copied as JSON, with repeated names collected into a list.
  • HTML entity encoding (essential characters, named entities, or decimal or hex codes) and decoding of every named entity.

Tips and good to know

  • Encode each query value on its own with “Part of a URL”, then join them with & and =. Encoding a whole address that way also encodes its slashes and breaks it.
  • If a decoded result still shows codes like %20, it was encoded twice. Press “Decode again” rather than editing by hand.
  • Garbled results such as “café” mean UTF-8 text was read as an older character set somewhere along the way. Decoding the original percent codes here gives the correct text.
  • Only use “Spaces as +” for query strings sent by HTML forms. In a path, + means a real plus sign.
  • “Take a URL apart” adds https:// when an address has no protocol, and tells you when it does.

Frequently asked questions

Is anything I paste sent to a server?

No. Encoding, decoding and URL breakdown all run in your browser. The addresses and text you paste are not uploaded, logged or stored.

Is it free? Is there a length limit?

It is free, with no sign-up and no limit set by the tool. Very long text, such as a whole data file, updates a little more slowly on older phones.

Does it work on a phone or offline?

Yes. It works in Safari, Chrome and Firefox on phones, tablets and computers, and keeps working without a connection once the page has loaded.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything with a special meaning in a URL, including / ? & = and #, so it is right for one value. encodeURI leaves those alone so a whole address keeps working, and only encodes spaces, accents and other unsafe characters.

Should a space be %20 or +?

Both are common. %20 works everywhere in a URL. + means a space only in query strings sent by HTML forms. If you are not sure, use %20.

Why does decoding fail with an error?

Either a % sign is not followed by two hex digits, or the codes don’t form valid UTF-8 text. The message names the exact character. A real % sign has to be written %25.

What are HTML entities?

They are codes such as &amp;, &lt; and &eacute; that let you show characters like &, < and é in HTML without the browser treating them as markup.

Page last reviewed