URL Encoder / Decoder

Encode special characters for safe use in URLs, or decode percent-encoded strings back to readable text. Handles Unicode, spaces, query parameters, and all reserved characters.

💻 Developer🌐 Full Unicode⚡ Instant
Input Length0
Output Length0
Encoded Chars0
Quick Overview & Direct Answer

URL Encoder / Decoder — Encode & Decode URLs Online Free: Free URL Encoder / Decoder tool: encode special characters in URLs or decode percent-encoded URL strings. Handle query parameters, Unicode, and spaces.

Primary Use Code debugging, syntax validation, encoding/decoding, API payload inspection
Input Formats Code snippets, JSON, XML, SQL, regex expressions, data structures
Output Format Formatted code, validation feedback, generated hashes, AST trees
Processing Mode 100% Client-Side JavaScript Engine
Access Tier Free, unlimited, no sign-up needed

How to Encode and Decode URLs

1

Enter Your URL

Paste a full URL or specific text that needs encoding. For decoding, paste percent-encoded strings like %20 or %E2%9C%93.

2

Choose Operation

"Encode URL" preserves URL structure while encoding unsafe characters. "Encode Component" encodes everything except letters, digits, and - _ . ~.

3

Copy Result

Copy the encoded URL directly into your code, API requests, or browser address bar. Swap to decode and verify round-trip consistency.

What Is URL Encoding?

URL encoding (also called percent-encoding) is the process of replacing characters that aren't allowed in URLs with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. Spaces become %20, ampersands become %26, and non-ASCII characters like "café" become multi-byte sequences like caf%C3%A9.

URLs can only contain a specific set of characters: letters, digits, and a handful of special characters like hyphens, underscores, periods, and tildes. Everything else — including spaces, international characters, punctuation, and symbols — must be encoded before they can appear in a URL. Without encoding, browsers and servers can't distinguish between characters that are part of the URL structure (like ? which starts query parameters) and characters that are part of the actual data.

This tool offers two encoding modes for different scenarios. encodeURI is designed for encoding complete URLs — it leaves the URL structure characters (:/?#[]@!$&'()*+,;=) intact while encoding everything else. encodeURIComponent encodes everything except letters, digits, and - _ . ~, making it the right choice for encoding individual query parameter values that might themselves contain structural characters like & or =.

International domain names and non-Latin query parameters have made URL encoding more important than ever. A search for "データ" (Japanese for "data") needs to be properly encoded as UTF-8 bytes before being placed in a URL. Modern browsers handle this automatically in the address bar, but if you're building API requests, constructing URLs in code, or debugging webhook payloads, understanding percent-encoding is essential.

Why Use Our URL Encoder?

🔀

Two Encoding Modes

"Encode URL" preserves URL structure while encoding unsafe characters. "Encode Component" encodes everything for safe embedding inside parameter values.

🌐

Full Unicode Support

Handles any language — Japanese, Arabic, Chinese, emoji — through proper UTF-8 byte encoding. Every character in Unicode can be safely represented in a URL.

📊

Encoding Analytics

See how many characters were encoded and the length difference. Helps you understand the overhead percent-encoding adds to your URLs.

🔒

Browser-Only

Uses JavaScript's native encodeURI/encodeURIComponent functions. Your URLs and data never leave your browser — safe for API keys and sensitive parameters.

Frequently Asked Questions

Encode URL (encodeURI) is for encoding complete URLs. It leaves structural characters like :, /, ?, #, &, and = intact. Encode Component (encodeURIComponent) encodes everything except letters, digits, and - _ . ~. Use Encode URL for full URLs, and Encode Component when encoding a single query parameter value that might contain special characters.

Percent-encoding (%20) is the standard defined by RFC 3986 for URLs. The plus sign (+) for spaces is a legacy convention from HTML form submission (application/x-www-form-urlencoded). Both are valid in query strings, but %20 is the universally correct representation. Our tool uses %20 for maximum compatibility.

You can, but it produces double-encoding (the % itself gets encoded to %25). If you encode %20 again, you get %2520. This is usually a mistake — it means the URL will need to be decoded twice to get the original value. If your URL is already encoded, decode it first before re-encoding.

No — they're completely different encoding schemes for different contexts. URL encoding uses percent-signs (%20, %26) for characters unsafe in URLs. HTML encoding uses named entities (&, <) for characters special in HTML markup. Using the wrong encoding for the wrong context causes bugs and potential security vulnerabilities.

Any character outside the "unreserved" set needs encoding. Unreserved characters are: A-Z, a-z, 0-9, hyphen (-), underscore (_), period (.), and tilde (~). Additionally, reserved characters (:, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =) have special meaning in URL structure and need encoding only when used as literal data rather than structural delimiters.