curly{bits}

Free developer tools. Nothing leaves your browser.

curlybits / URL Encode

URL Encode & Decode

Encode text so it's safe to put in a URL, or decode percent-encoded strings like %20 back into readable text. Paste a full URL to see its parts and every query parameter, decoded.

Input
Output

How to use the URL Encode & Decode

  1. Choose Encode or Decode.
  2. Paste your text or URL on the left. The result appears on the right as you type.
  3. For HTML form data, tick Spaces as +. To encode a whole URL without breaking its ://, / and ?, tick Keep URL structure.
  4. Paste a full URL to see its host, path and query parameters in a table below.

What is URL encoding?

URLs can only contain a limited set of characters. Everything else (spaces, accented letters, emoji, and symbols like &, ? and # that have special meaning) must be percent-encoded: converted to UTF-8 bytes, each written as % plus two hex digits.

pad thai & tea  →  pad%20thai%20%26%20tea

Encode a value or a whole URL?

  • Default (encodeURIComponent): for a single value going into a query string or path segment. It encodes / ? & = # too, so the value can't break the URL.
  • Keep URL structure (encodeURI): for a complete URL that only needs spaces and special characters fixed. It leaves : / ? & = # alone.

%20 or +?

Both can mean a space. %20 works everywhere in a URL. + means a space only in query strings sent by HTML forms (application/x-www-form-urlencoded). When decoding, keep Spaces as + ticked for form data, and untick it if your text contains real plus signs.

Double encoding

If a decoded result still contains sequences like %20, the text was encoded twice, for example %2520. The tool warns you, and Use as input lets you decode it again.

Frequently asked questions

What does %20 mean in a URL?

It's an encoded space. The number after % is the character's byte in hexadecimal: 20 is a space, 26 is &, 2F is /.

Why do I get a 'malformed' error?

A % must be followed by two hex digits that form valid UTF-8. A lone % or text cut off in the middle of a character can't be decoded. Encode a literal % as %25.

Does it support Thai, Chinese and emoji?

Yes. Text is encoded as UTF-8, the standard used by all modern browsers and servers.

Is my data sent anywhere?

No. Everything runs in your browser.

Add this URL encoder and decoder to your website

Free for blogs, schools and businesses. Copy the code below and paste it into your page's HTML. The tool works exactly like this one and runs in your visitors' browsers, so nothing is uploaded. Please keep the credit line so others can find it too.

Preview embed ↗