URL Encode & Decode Tool

Encode and decode URLs, query parameters, and UTF-8 strings in real time with encodeURIComponent / encodeURI modes, %20 vs + space handling, and an automatic Query String inspector—100% locally in your browser.

🔒 Privacy Guarantee: 100% local in-browser processing. Your input is NEVER saved, logged, or uploaded—use with complete peace of mind.
Function:
Spaces:
0 chars · 0 bytes
0 chars · 0 bytes

⚡ Quick Answer

DayToolHub URL Encode & Decode runs 100% locally in your browser using standard RFC 3986 percent-encoding (encodeURIComponent & encodeURI) with %20 / + space toggling and an instant Query String table parser—your data is never saved, logged, or sent to any server.

How to Use URL Encode & Decode

  1. Choose either "URL Encode" or "URL Decode" mode.
  2. Select encodeURIComponent (recommended for query values) or encodeURI (preserves full URL structure), and toggle %20 vs + space handling.
  3. Type or paste any text or URL to view the instant encoded/decoded output along with character and UTF-8 byte counts.
  4. When your input includes query parameters (?key=value), inspect and copy every decoded key/value pair directly from the Query String table below.

encodeURIComponent vs. encodeURI: Which One Should You Use?

Both functions apply RFC 3986 UTF-8 percent-encoding, but they preserve different sets of characters depending on whether you are encoding a single parameter value or an entire URL:

encodeURIComponent (default for parameter values): Preserves only A-Z a-z 0-9 - _ . ! ~ * ' ( ) and encodes delimiters like : / ? & = # +. Always use this when embedding a value or nested URL inside a query parameter.

encodeURI (for complete URLs): Keeps structural URL characters ; , / ? : @ & = + $ # intact while encoding spaces, Unicode characters, and unsafe symbols.

Common Reserved Characters & UTF-8 Percent-Encoding Reference

Character Encoded Form Role in URLs
Space%20 or +RFC 3986 paths & standard URLs use %20; HTML form data (x-www-form-urlencoded) often uses +
&%26Separates query parameters; literal ampersands inside values must be encoded
=%3DSeparates parameter keys and values
?%3FMarks the start of the query string
#%23Marks the client-side URL fragment (not sent to servers)
/%2FPath segment separator
:%3AScheme and port delimiter
+%2BMust be encoded as %2B when a literal plus sign is needed in form-encoded queries
%%25Escape prefix itself; literal percent signs must be encoded to avoid malformed sequences
@%40User-info and email delimiter
🚀 (UTF-8)%F0%9F%9A%80Multi-byte UTF-8 characters are encoded byte-by-byte as uppercase hex pairs

3 Practical Tips to Avoid URL Encoding Bugs

  • Watch out for double encoding: Encoding an already encoded string turns %20 into %2520. Use the Swap button and Query String parser to verify your string is encoded exactly once.
  • Keep path and query space rules separate: A + in a URL path stays a literal plus sign, whereas in form-encoded query strings it usually decodes to a space.
  • Never paste sensitive URLs into server-backed tools: Because DayToolHub runs 100% locally in your browser with zero backend calls, you can safely inspect internal URLs and query tokens even offline.

Frequently Asked Questions (FAQ)

Is my input saved, logged, or sent to any server?
Never. Everything runs 100% locally inside your browser using native JavaScript APIs. No input is ever saved, logged, or uploaded—you can even use this tool completely offline.
When should I pick encodeURIComponent instead of encodeURI?
Use encodeURIComponent for individual query keys/values (such as search text, callback URLs, or strings containing & and =). Use encodeURI only when you want to encode a complete URL while keeping https://, /, ?, &, and = untouched.
Why does decoding show an invalid percent-encoding error?
Every % sign in an encoded URL must be followed by two valid hexadecimal digits (0–9, A–F) forming valid UTF-8 bytes. Raw % signs (like "50%off"), typos like %ZZ, or truncated multi-byte UTF-8 sequences will trigger a clear validation message.
What is the difference between %20 and + for spaces?
%20 is the RFC 3986 standard for spaces anywhere in a URL, while + comes from the application/x-www-form-urlencoded form specification used in query strings. Toggle between both formats anytime.
Does it support UTF-8 international characters and emojis?
Yes. It fully supports UTF-8 encoding and decoding for Chinese, Japanese, Korean, accented Latin scripts, and 4-byte emojis, and displays both character length and exact UTF-8 byte counts.
How does the Query String parameter parser work?
Paste either a full URL with ?key=value pairs or a raw query string (a=1&b=hello). The parser automatically extracts and decodes every key/value pair into a structured table with one-click copy buttons.

Related Tools & Further Reading