Developer tools

URL Encoder

URL Encoder & Decoder

Percent-encode and decode URLs and query values with encodeURIComponent, encodeURI or form encoding.

About this tool

About URL Encoder

Percent-encode text so it is safe inside a URL, or turn %20-style escapes back into readable text. Three modes match what code actually does. Component behaves like JavaScript's encodeURIComponent and is right for a single query value or path segment. Full URL behaves like encodeURI and keeps the characters that give a URL its structure, such as :, /, ?, & and #, so a link with spaces or accents still works. Form uses the application/x-www-form-urlencoded rules of HTML forms and URLSearchParams, where a space becomes +. Everything is encoded as UTF-8, so é becomes %C3%A9. The decoder tells you the exact position of a broken escape such as a lone % sign, warns about text that isn't valid UTF-8, and can peel off several layers when something was encoded twice. Paste a full link and open URL breakdown to see its host, path and every query parameter decoded in a table. Nothing leaves your browser.

Built and maintained by Abhi JainUpdated

How to URL Encode Text

  1. 1

    Choose Encode or Decode

    Pick the Direction, then the Mode: Component, Full URL or Form (+ for space).

  2. 2

    Paste your text

    Paste a query value, a whole link or encoded text. The result appears as you type.

  3. 3

    Check and copy

    Open URL breakdown to inspect the query parameters, then copy or download the result.

URL Encoder: questions and answers

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for a complete URL and leaves reserved characters like : / ? # & = alone. encodeURIComponent is for one piece of a URL, such as a query value, and escapes those characters too, so an & inside a value can't split it into two parameters.

Should a space be %20 or +?

Both are common. %20 is correct anywhere in a URL. + means a space only in the query string of HTML form submissions (application/x-www-form-urlencoded). Use Form mode when you need +.

Why do I see %2520 in my URL?

The text was encoded twice: % became %25, so %20 turned into %2520. Decode with Decode repeatedly turned on to remove every layer, then encode once.

Which characters never need encoding?

RFC 3986 unreserved characters: A–Z, a–z, 0–9, hyphen, period, underscore and tilde. Everything else is either reserved for URL syntax or must be percent-encoded as UTF-8 bytes.

What does 'malformed escape' mean?

A % sign must be followed by two hex digits. A bare % (as in 50%) or %G1 can't be decoded; a literal percent sign is written %25.

Ready-made URL Encoder presets