URL Encode / Decode Online - URL Encoder & Decoder + HTML Escape
A tool for encoding and decoding 6 types of string formats: URL, HTML, JSON, XML, JavaScript, and SQL.
How to Use
- Select an encoding type from the dropdown (URL / HTML / JSON / XML / JavaScript / SQL)
- For URL and HTML, sub-options are available (encodeURIComponent / encodeURI, Named / Numeric entities)
- Enter the text you want to encode or decode in the left text area
- Click 'Encode' or 'Decode' to see the result on the right
- Use the copy button to copy the result to your clipboard
Usage Examples
URL encode (encodeURIComponent): Input: search keyword&type=1 Encoded: search%20keyword%26type%3D1
HTML escape (named entities):
Input: <script>alert("XSS")</script>
Escaped: <script>alert("XSS")</script>
SQL single-quote escape: Input: O'Brien Escaped: O''Brien
FAQ
- Is my data sent to a server?
- No. All processing is done entirely within your browser.
- What is the difference between encodeURIComponent and encodeURI?
- encodeURIComponent encodes URL components (e.g., query parameter values). encodeURI encodes an entire URL, so structural characters like ://?=& are not encoded.
- What is the difference between named and numeric HTML entities?
- Named entities use readable names like & and <. Numeric entities use Unicode code points like & and <, and work for any character.
- What does JSON encoding do?
- It escapes characters with special meaning inside JSON string literals, such as newlines (\n), tabs (\t), backslashes (\\), and double quotes (\").
- What if decoding fails?
- Check that your input is in the correct encoded format. For URL decode, input must be percent-encoded. An error message will appear if the input is invalid.
Related Tools
Update History
Last Updated: 2026-02-20
- 2026-02-20 Initial release