How this tool computes its result
Encodes text by passing it through encodeURIComponent(), which converts special characters (including spaces, punctuation, and non-ASCII) to percent-encoded form (e.g., space → %20, & → %26). Decoding attempts the reverse via decodeURIComponent() inside a try-catch; if the string is malformed (e.g., an incomplete percent sequence like "%2"), decodeURIComponent() throws and the tool silently returns an empty string with an error message displayed. The UI provides convenience buttons to swap the input between encoded and decoded forms, and a clear button to reset.
