URL Encoder & Decoder

100% Client-Side Private

Encode and decode query strings, URI components, and inspect query params

Mode:
RFC 3986 & W3C URI Specification

RFC 3986 URI Percent-Encoding & Query Parameter Parsing Guide

W3C URI specification, encodeURI vs encodeURIComponent differentiation, and in-browser URL inspection.

Core RFC 3986 Encoding Specifications

  • Dual Encoding Modes: Explicit selection between encodeURIComponent (query values) and encodeURI (full addresses).
  • RFC 3986 & WHATWG URL Compliance: Accurate percent-encoding (%20 vs +) with complete UTF-8 multi-byte support.
  • Query String Visualizer: Break down complex URL search parameters into an editable key-value inspection table.

Character Classification Under RFC 3986: Reserved vs Unreserved

The URI standard partitions ASCII into reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) that delimit URL components, and unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) that require no encoding. Any character outside this unreserved set—including UTF-8 multibyte characters and spaces—is converted into its byte hexadecimal representation prefixed with a percent sign (%HH).

Frequently Asked Questions (FAQ)

What is the crucial difference between encodeURI() and encodeURIComponent()?

encodeURI() is designed to encode a complete URL; it intentionally leaves protocol and path separators like :, /, ?, #, and & intact so the URL remains navigable. encodeURIComponent() encodes everything except unreserved alphanumeric characters, making it mandatory for query parameter values to prevent parameter injection.

Why are spaces sometimes encoded as %20 and other times as a plus sign (+)?

In RFC 3986 URI paths, a space must always be encoded as %20. The plus sign (+) convention originates from the legacy HTML form standard (application/x-www-form-urlencoded) used in query strings. Modern REST APIs and URL parsers treat %20 as the canonical, unambiguous space representation.

Why does decodeURIComponent() throw a URIError: URI malformed?

This exception occurs when the input contains an invalid percent sequence (such as a bare % not followed by two hexadecimal digits) or an incomplete multi-byte UTF-8 sequence. MiniToolDesk safely catches malformed sequences and indicates the parsing error without crashing.

Pin this tool to your browser side panel

Access this utility anytime with Alt+M without switching tabs. 100% offline & free.

Get Extension

How to encode and decode URLs

  1. 1Select Encode or Decode mode depending on your task.
  2. 2Paste your target URL, query string, or parameter string.
  3. 3Copy the sanitized, safely escaped URL result.

RFC 3986 URL Compliance

Characters like spaces, question marks, ampersands, and slashes must be percent-encoded to prevent breaking HTTP routing or query parsing.

Frequently Asked Questions

Enjoying URL Encoder & Decoder?Help your engineering peers discover private, ad-free tools!

MiniToolDesk is 100% free and client-side. Your support keeps the web ad-free.

Related Developer Utilities