URL Encoder & Decoder — How to Encode Special Characters in URLs

Updated October 2026 · 3 min read

Quick start: Open the free URL Encoder — paste any URL or string to encode or decode percent-encoded characters instantly.

URLs are restricted to a specific set of ASCII characters. Spaces, non-ASCII letters, special symbols and reserved characters (like &, =, #) must be converted to a "percent-encoded" form before they can be safely used in a URL. This is called URL encoding or percent-encoding.

How Percent-Encoding Works

Each unsafe character is replaced by a % followed by its two-digit hexadecimal ASCII code. A space becomes %20, an ampersand becomes %26, a hash becomes %23.

CharacterEncodedCommon context
Space%20File names, search queries
&%26Query string values containing &
+%2BAvoids confusion with space-as-+ in form data
#%23Anchor/fragment symbols in values
Non-ASCII (e.g. é)%C3%A9Internationalised URLs

encodeURI vs encodeURIComponent in JavaScript

encodeURI() encodes a complete URL — it leaves characters like /, ?, = and & untouched because they are valid URL structure characters. encodeURIComponent() encodes everything including those reserved characters — use it for query string values, not the full URL. Mixing these up is one of the most common URL-handling bugs in web applications.

When You Need to Decode

Log files, form submissions and API responses often contain percent-encoded strings. Decoding them makes them human-readable and lets you debug routing or query-string issues without manually translating hex codes.

Encode or Decode Any URL Free

Supports full URL encoding and component encoding. Instant results, no data sent anywhere.

Open Free URL Encoder →