Paste your text or URL here, or drag a file…
Drag & drop a file, or paste content above
Output will appear here
About
The URL Encoder / Decoder uses the browser-native encodeURIComponent function to convert any string to URL-safe percent-encoded format — spaces become %20, ampersands become %26, and non-ASCII characters are encoded as UTF-8 byte sequences. The decoder reverses all percent-encoded sequences back to their original characters using decodeURIComponent. This is essential for safely embedding values in query strings, path segments, or form submissions. Everything runs in your browser — no network requests, no sign-up required.
How to use
- 1 Paste the string you want to encode or decode into the input.
- 2 Select Encode to percent-encode it, or Decode to reverse it.
- 3 Use the copy button to copy the result.
- What characters get percent-encoded in a URL?
- Any character that is not an unreserved character (A–Z, a–z, 0–9, -, _, ., ~) gets replaced with a % followed by its two-digit hexadecimal code. For example, a space becomes %20, an ampersand becomes %26, and a forward slash becomes %2F.
- What is the difference between encodeURI and encodeURIComponent?
- encodeURI encodes a complete URL and leaves reserved characters like /, ?, #, and & intact because they have structural meaning in URLs. encodeURIComponent encodes a single component (e.g. a query parameter value) and also encodes those reserved characters, which is necessary when the value itself contains them.
- When do I need to URL-encode a string?
- You need to URL-encode any value placed in a query string, path segment, or form submission that contains spaces, special characters, or non-ASCII text. For example, a search query like "hello world" must be encoded as "hello%20world" before it can be safely appended to a URL.