URL Encoder / Decoder

Percent-encode URLs or decode %xx sequences — converts instantly as you type

Mode
Variant
Plain Text / URL
Ctrl+Enter to convert
Encoded URL

          

Output will appear here
Paste or type on the left

Input: -
Output: -
Encoded: -

Free Online URL Encoder and Decoder

Percent-encode special characters in a URL or decode %xx sequences back to readable text with our free online URL encoder decoder. Conversion happens in real time as you type — no button clicks needed. All processing runs entirely in your browser — your data never leaves your device.

How to Use

  1. Select Encode to percent-encode a URL or text, or Decode to convert %xx sequences back to characters
  2. In Encode mode, choose Component (encodes everything, ideal for query values) or URI (preserves URL structure characters like /, ?, #)
  3. Paste or type your input on the left
  4. The result appears instantly on the right
  5. Click Copy Output to copy the result to your clipboard
  6. Use Swap to flip input and output and work in the other direction

Features

What is URL Encoding?

URL encoding (also called percent encoding) converts characters that are not allowed or have special meaning in a URL into a safe representation. Each unsafe character is replaced by a % followed by two hexadecimal digits representing the character's byte value in UTF-8. For example, a space becomes %20, and an equals sign becomes %3D.

URLs can only contain a limited set of characters from the ASCII character set. Any character outside that set — including spaces, accented letters, emoji, and many punctuation marks — must be percent-encoded before being included in a URL. This is essential when constructing query strings, passing data in path segments, or embedding values in API requests.

Encoding Example

Plain text input:

hello world & foo=bar

URL encoded output (Component):

hello%20world%20%26%20foo%3Dbar

URL encoded output (URI):

hello%20world%20&%20foo=bar

Decoding Example

Encoded input:

https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world

Decoded output:

https://example.com/search?q=hello world

encodeURIComponent vs encodeURI

JavaScript provides two built-in functions for URL encoding, and they differ in what they leave untouched:

When in doubt, use Component mode for query string values and form data. Use URI mode only when encoding a full URL and you want to preserve slashes and other structural characters.

Frequently Asked Questions

What does %20 mean in a URL?
%20 is the percent-encoded representation of a space character. The hex value 20 is the ASCII code for space. You'll also see + used for spaces in query strings (HTML form encoding), but percent-encoding with %20 is unambiguous and universally supported.
When do I need to URL encode?
Whenever you include user-supplied values in a URL — query parameters, path segments, or form submissions. Without encoding, characters like &, =, #, and spaces will be misinterpreted as URL structure, breaking the request or silently passing the wrong value.
Is my data safe?
Yes. All encoding and decoding happens entirely in your browser using JavaScript. Your input is never sent to any server. This tool works offline too.
What's the difference between URL encoding and HTML encoding?
URL encoding uses %xx percent sequences for special characters in URLs. HTML encoding uses named entities like & and < for characters with special meaning in HTML. They solve different problems — use URL encoding for query strings and path segments, HTML encoding for text inside HTML documents.
Why does the decoded output sometimes look wrong?
If the encoded string uses non-standard encoding (like ISO-8859-1 instead of UTF-8), the decoded output may appear garbled. This tool assumes UTF-8 encoding, which is the standard for modern web applications. Legacy systems may use different encodings.
What characters don't need to be encoded?
The unreserved characters are always safe in URLs without encoding: letters (A–Z, a–z), digits (0–9), and the four symbols - _ . ~. Everything else should be percent-encoded when used in a context where it might be misinterpreted.