URL Encoder & Decoder - Encode / Decode URLs Online

Encode or decode URLs online. Parse query parameters, convert special characters. Free, no signup.

About This Tool

URL Encoder/Decoder converts text to and from percent-encoded format (RFC 3986) for safe use in URLs and query strings. It handles all Unicode characters, reserved characters, and special symbols. Indispensable for web developers dealing with query parameters, API endpoints, or debugging encoded URLs.

(Encodes all special chars — best for query values)
Result will appear here

encodeURI vs encodeURIComponent

encodeURI()

Use for encoding full URLs. Preserves URL structure characters like :, /, ?, #, &.

encodeURI("https://example.com/path?q=hello world")
→ https://example.com/path?q=hello%20world

encodeURIComponent()

Use for encoding query parameter values. Encodes all special characters.

encodeURIComponent("hello world&name=test")
→ hello%20world%26name%3Dtest

How It Works

URL encoding (percent-encoding) replaces unsafe or reserved characters in a URI with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20, and the ampersand (&) becomes %26. This is defined in RFC 3986, which specifies that only unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) can appear literally in a URI.

For multi-byte Unicode characters (such as Korean, Chinese, or emoji), the text is first encoded to UTF-8, and each resulting byte is individually percent-encoded. For instance, the Korean character '한' (U+D55C) encodes to the UTF-8 bytes EC 95 9C, producing %ED%95%9C. This tool uses JavaScript's `encodeURIComponent()` for encoding and `decodeURIComponent()` for decoding. Unlike `encodeURI()`, `encodeURIComponent()` also encodes reserved characters like /, ?, #, and & — making it the correct choice for encoding individual query parameter values.

Share

How to Use

  1. 1Select Encode or Decode mode.
  2. 2Choose encodeURIComponent (for query values) or encodeURI (for full URLs).
  3. 3Enter text and see the result update in real time.
  4. 4If you enter a URL, it will be automatically parsed into protocol, host, path, and query parameters.
  5. 5Click Copy to copy the result, or use the Swap button to exchange input and output.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts characters that aren't allowed in URLs into %XX format. For example, a space becomes %20 and non-ASCII characters like Korean are converted to their UTF-8 byte sequences.

What's the difference between encodeURIComponent and encodeURI?

encodeURI preserves the URL structure (doesn't encode ://, /, ?, # etc.). encodeURIComponent encodes all special characters, making it ideal for encoding query parameter values.

Why is URL encoding necessary?

URLs can only contain ASCII characters. To include spaces, non-ASCII characters, or reserved characters in URLs, they must be percent-encoded so browsers and servers can process them correctly.

Is my data safe?

Yes. All encoding and decoding is performed entirely in your browser. No data is sent to any server. Your input never leaves your device.

What is URL parsing?

URL parsing breaks a full URL into its components: protocol, host, path, query parameters, and hash. It's useful for debugging and API development.

Related Articles

84+

Tools available

97+

Blog articles

English & 한국어

Languages

Bookmark this page! We add new free tools every week.