Developer tool
URL & HTML Entity Encoder / Decoder
Encode special characters for use in a URL, or as safe HTML entities — both directions.
URL encoding
HTML entity encoding
About the URL & HTML Entity Encoder / Decoder
This tool encodes and decodes URL text (percent-encoding) and HTML entities. Use it to make a string safe in a link, read an encoded URL, or display special characters such as < and & in a web page.
URLs can only contain certain characters, so spaces and symbols are replaced by a percent sign and a hexadecimal code, for example a space becomes %20. In HTML, characters with special meaning are written as entities, such as < for < and & for &. Encoding HTML output is an important defence against cross-site scripting.
How to use it
- For URLs, paste text in Plain text and press Encode, or paste an encoded string and press Decode.
- For HTML, use the HTML entity section in the same way.
- Check the output.
- Copy it.
Tips and good to know
- Encode only the parts of a URL that need it, such as query values.
- Do not encode an entire URL twice.
- Always escape user input before placing it in HTML.
Frequently asked questions
Why %20 and not +?
Both appear in forms, but %20 is the standard for spaces.
What does & stand for?
The ampersand.
Is it private?
Yes.