HTML / URL Encoder & Decoder
Free online HTML Entity and URL Encoder/Decoder. Easily escape HTML characters or encode URL parameters client-side.
Client-Side HTML Entity & URL Encoder / Decoder Guide
Safely escape markup special characters, sanitize user inputs against XSS, and format URI parameters entirely in your browser.
How to Encode and Decode HTML and URLs Online
-
1 Select Tool Mode
Choose between URL Encoder/Decoder (encodeURIComponent vs encodeURI) or HTML Entity Encoder/Decoder (Named vs Numeric entities).
-
2 Input Plain or Escaped Strings
Paste raw text, query strings, or HTML snippets into the left editor, or click 'Sample' to test a realistic payload.
-
3 Encode, Decode, or Swap
Click Encode to escape characters or Decode to restore human-readable strings. Swap inputs and outputs for multi-stage transformations.
Key Features & Architecture
Seamlessly handles both URL percent-encoding (%20, %2F) and HTML character entities (<, >, &, ", ').
Your confidential query parameters, authentication tokens, and HTML markup never leave your browser sandbox.
Convert potentially dangerous symbols like <, >, &, ", and ' into safe entities to prevent cross-site scripting vulnerabilities.
One-click swapping between input and output panes allows seamless round-trip verification.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves protocol and domain delimiter characters like http://, ?, &, and /, whereas encodeURIComponent escapes every special character, making it ideal for query string values.
Are my parameters or tokens sent to a remote server?
No. All encoding and decoding logic executes 100% locally in your browser memory using native JavaScript APIs.
Why should I escape HTML characters?
Escaping special characters prevents browsers from interpreting user-supplied text as executable HTML tags, effectively stopping XSS attacks.
Does this tool support both named and decimal numeric HTML entities?
Yes. You can toggle between named entities (like ©) and numeric decimal or hexadecimal entities (like ©).