What it is
Text encoding schemes represent characters as bytes or escape sequences so text survives transport through systems with different rules, such as URLs, HTML, or JSON strings.
When to use it
Reach for this when a value breaks a URL, an HTML page renders raw entities, or a JSON payload needs escaped quotes and control characters before you paste it into code.
Gotchas & limits
Percent-encoding, HTML entities, and JSON escaping are not interchangeable; encoding a value twice (double-encoding) is a common source of bugs when values pass through multiple layers.