SmartKitio

Developer topics · Updated 2026-10-04

URL Encoding Explained

URLs can only carry a limited character set safely in some components. Percent-encoding represents other bytes as %HH sequences so separators like & and = keep their structural meaning.

The rule of thumb

Encode the values you insert into a query string or path segment—not the entire URL with its scheme and slashes already in place.

Safe unescaped in encodeURIComponent: A–Z a–z 0–9 - _ . ! ~ * ' ( ) Everything else → UTF-8 bytes as %HH

Spaces: %20 vs +

encodeURIComponent always emits %20. Older application/x-www-form-urlencoded bodies use + for space. Most servers accept both in query strings; do not assume every decoder does.

SmartKitio behavior

  • URL Encoder uses encodeURIComponent semantics.
  • URL Decoder converts + to space first, then applies decodeURIComponent.
  • Invalid % sequences produce an error instead of silent corruption.
  • All processing stays in the browser.

Try these SmartKitio tools

Use a tool when you want a result; keep this guide open when you want the method.

Browse family: Developer Tools

Related articles

Broader reading that connects to this guide—when the topic deserves more than a how-to.

Related guides