URL Encoder/Decoder

URL encode and decode online using encodeURI and encodeURIComponent. Parse URL structure, extract query parameters, and fix encoding issues.

Run a check to see results

APIPOST /api/v1/util/urlencode
5(11 votes)
1
checks performed
Try also: Base64 Encoder/Decoder
Run Check

Key Features

100% Free

No registration required, unlimited checks

Instant Results

Real-time analysis with detailed output

REST API Access

Integrate into your workflow via API

Accurate Data

Live queries to authoritative sources

What is URL Encoder/Decoder?

The URL encoder and decoder converts special characters in URLs to their percent-encoded equivalents (encoding) and back to readable characters (decoding). It supports two JavaScript encoding modes: encodeURI (for complete URLs, preserves structural characters like :, /, ?, and #) and encodeURIComponent (for individual parameter values, encodes everything except letters and digits). The tool also parses URL structure to extract and display protocol, hostname, port, path, query parameters, and fragment.

URL encoding is essential because URLs can only contain a limited set of ASCII characters — special characters, spaces, Unicode characters, and reserved characters must be percent-encoded to be transmitted correctly. This free URL encoder is used by web developers constructing API requests with special characters in parameters, backend developers debugging encoded query strings, SEO specialists working with URLs containing non-Latin characters, and anyone troubleshooting broken URLs caused by encoding issues.

How to Use

  1. 1Enter or paste the URL or text string you want to encode or decode
  2. 2Choose the mode: encodeURI (full URLs) or encodeURIComponent (parameter values)
  3. 3View the encoded or decoded result instantly
  4. 4Review the parsed URL structure: protocol, host, path, and individual query parameters
  5. 5Copy the result for use in your code, API request, or browser

Who Uses This

System Administrators

Monitor and troubleshoot infrastructure

Developers

Debug network issues and integrate via API

SEO Specialists

Verify domain configuration and performance

Security Analysts

Audit and assess network security

Frequently Asked Questions

What is URL encoding and why is it necessary?
URL encoding (also called percent encoding) replaces characters that are not allowed in URLs with a percent sign (%) followed by their two-digit hexadecimal code. For example, a space becomes %20, an ampersand becomes %26, and a non-Latin character like a Cyrillic letter gets encoded as its UTF-8 hex representation. This is necessary because the URL specification (RFC 3986) only allows a limited set of unreserved characters: letters (A-Z, a-z), digits (0-9), and four special characters (- _ . ~). Everything else must be encoded to be safely transmitted in a URL.
What is the difference between encodeURI and encodeURIComponent?
encodeURI is designed for encoding a complete URL — it leaves structural characters intact (: / ? # [ ] =) so the URL remains valid. Use it when you have a full URL with special characters only in the path or query. encodeURIComponent encodes everything except letters, digits, and a few safe characters (- _ . ~ ! * ' ( )) — it's designed for encoding individual query parameter values. Example: if a parameter value contains an ampersand, encodeURIComponent converts it to %26 so it's not mistaken for a parameter separator.
How do I decode a URL-encoded string?
Paste the encoded string into the tool and select decode mode. Percent-encoded sequences like %20, %3D, and %26 will be converted back to their original characters (space, =, and &). This is useful for reading URLs from server logs, debugging API requests, and understanding encoded query strings. The tool handles both single-encoded and double-encoded strings.
Why do my URLs break when they contain special characters?
URLs break when they contain unencoded special characters that have reserved meanings in URL syntax. For example, an unencoded space splits the URL, an unencoded # starts a fragment identifier (cutting off everything after it), an unencoded & in a parameter value is mistaken for a parameter separator, and non-ASCII characters may be handled differently by different browsers and servers. The solution is to always URL-encode parameter values using encodeURIComponent before constructing the URL.
How does URL encoding handle Unicode and non-Latin characters?
Unicode characters (Cyrillic, Chinese, Arabic, emoji, etc.) are first converted to their UTF-8 byte representation, then each byte is percent-encoded. For example, the Cyrillic letter 'Я' (UTF-8 bytes D0 AF) becomes %D0%AF. Modern browsers display decoded Unicode in the address bar for readability (called Internationalized Domain Names and IRIs) but transmit the percent-encoded form to servers. When building URLs programmatically, always encode non-Latin characters to ensure compatibility across all systems.