URL Encoder / Decoder

Encode plain text for safe use in URLs or decode URL-encoded strings back to readable text. Uses standard percent-encoding (RFC 3986).

Using encodeURI() — encodes special characters but preserves URL structure (:/?#[]@!$&'()*+,;=)

What Is URL Encoding?

URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted over the internet. Special characters like spaces, ampersands, and non-ASCII characters are replaced with a % followed by their hexadecimal code. For example, a space becomes %20, and "你好" becomes %E4%BD%A0%E5%A5%BD.

Full URL vs Component Encoding

Full URL (encodeURI / decodeURI): Used when you have a complete URL. It preserves URL structure characters like :/?#[]@!$&'()*+,;= so the URL remains valid.

Component (encodeURIComponent / decodeURIComponent): Used for encoding individual parts of a URL, like query parameter values. It encodes all special characters, including the ones that Full URL preserves.

When to Use Each

Use Full URL when encoding an entire URL like https://example.com/search?q=hello world. Use Component when encoding a single value that will be inserted into a URL, like a search term or form field value.