HOW IT WORKS
RFC 3986 percent-encoding and form encoding
URLs may only contain a small set of unreserved ASCII characters directly. Reserved delimiters (&, =, ?, /) and non-ASCII UTF-8 characters must be percent-encoded as %XX hexadecimal bytes.
encodeURIComponent (%20 for spaces)
Encodes every reserved character and UTF-8 byte sequence so a value can be safely placed inside a URL query parameter.
Form-URL-Encoded (+ for spaces)
HTML forms using application/x-www-form-urlencoded represent spaces as + instead of %20. Toggle the checkbox to match form behavior.
Safe Decoding
Uses decodeURIComponent and catches malformed % sequences with a clear inline error.