Using the URL Encode / Decode
Enter the value you want to encode, not a complete URL whose separators should remain intact. Encoding a whole address would also encode characters such as slashes and question marks. Decoding requires valid percent-encoded sequences for the component.
Worked example
Use the example inputs below to reproduce this result. These are the form's starting values, not recommended targets. Changing your inputs updates your result above; this worked example stays fixed for comparison. Results are rounded for display.
Example inputs
- Operation
- Encode
- Text
- Hello, world!
Example result
- Result
- Hello%2C%20world!
Method and assumptions
Encodes a URL component, not an entire URL. Decoding preserves + as a literal plus, consistent with decodeURIComponent.
Know the format expected at the other end
Encoding works when the sender and receiver agree on the format and character representation. Check whether a value is already encoded before processing it, and decode only the intended layer. Encoding can make data suitable for transport, but it does not establish authenticity or confidentiality. A readable decoded value is not proof that its contents are trustworthy.
Common question
Why does decoding leave a plus sign unchanged?
This tool follows decodeURIComponent, which treats a literal plus as a plus. Some form-encoding formats use plus to represent a space, but that is a separate convention. Check which format the source uses before interpreting the result.
Guide updated .