consolelog.tools

URL Encoder / Decoder

Encode & decode URLs — component, full-URI, or form (+) modes, with tolerant never-throw decoding. Live.

About this ToolHow it works, benefits & use cases

Percent-encoding is what keeps spaces, ampersands, and Unicode from breaking a URL — and this tool encodes and decodes it correctly in three distinct modes. Component mode (encodeURIComponent) escapes every reserved character, which is what you want for a single query value or path segment. Full URI mode (encodeURI) leaves the structural characters ":" "/" "?" "#" "&" "=" intact so an entire address stays usable. Form mode produces application/x-www-form-urlencoded output where spaces become "+", matching how browsers submit forms. The decoder never throws: a malformed "%" escape is reported as a friendly error instead of crashing, and an optional "treat + as space" toggle handles form-encoded input. Everything updates live as you type, you can swap input and output to reverse a conversion, and the whole exchange is captured in a shareable URL. It runs entirely in your browser with no upload.

How to Use

  1. 1Pick Encode or Decode with the toggle at the top.
  2. 2When encoding, open Options and choose the mode: Component (encodeURIComponent), Full URI (encodeURI), or Form (+ for space).
  3. 3When decoding, optionally tick "Treat + as space" for form-encoded input.
  4. 4Type or paste your text or URL into the input — the result appears live below.
  5. 5Click "Encode URL" / "Decode URL" to confirm, then copy, download, swap input ↔ output, or share the link.

Key Benefits

  • Three encoding modes: component, full-URI, and x-www-form-urlencoded
  • Component mode escapes every reserved character for safe query values
  • Full-URI mode preserves : / ? # & = so a whole address stays valid
  • Form mode renders spaces as "+" to match browser form submissions
  • Tolerant decoder reports malformed % escapes instead of throwing
  • Optional "+ as space" handling for decoding form data
  • Live preview, swap, and a shareable URL that reproduces the conversion

Common Use Cases

  • Encoding a single query parameter value before appending it to a URL
  • Decoding a captured request URL to read its parameters in plain text
  • Preparing application/x-www-form-urlencoded request bodies
  • Escaping Unicode or spaces in a path segment without breaking the URL structure
  • Debugging why a link with reserved characters fails by inspecting its encoded form

Options

Component — encodes everything reserved

0 characters · live

Enter input above to see the result.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools