How to use this tool
- Enter text or encoded component, mode.
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| Text or encoded component | Keep the structure and separators shown in the sample. Line breaks are retained in this input. | hello world & more |
| Mode | Choose Encode component / Decode component. | Encode component |
Result for these sample inputs
hello%20world%20%26%20more
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
The method, explained
Encoding uses encodeURIComponent to escape a component. Decoding uses decodeURIComponent to interpret percent-encoded bytes as text.
The component “hello world” encodes as “hello%20world”. The ampersand encodes as %26.
What to keep in mind
This encodes a component, not an entire URL while preserving its separators. Plus signs are not automatically converted to spaces during decoding.
Common questions
Can I paste a complete URL?
You can, but component encoding will also escape its slashes and separators. That is useful only when embedding the whole URL as a value.
Does encoding encrypt the text?
No. Anyone can reverse percent encoding; it provides no secrecy.
Methodology maintained by ClarityKit. How these tools are built and checked.