Text-Converters

URL & HTML Encoder / Decoder

Encode or decode URL percent-encoded strings and HTML entities instantly in your browser. No data is sent to any server — fully private and free.

Text to Encode
Encoded Output
About the URL & HTML Encoder

When building websites or working with APIs, you will regularly encounter two common encoding problems: characters in a URL that break the link, and HTML special characters that a browser would mistakenly interpret as markup. This tool solves both. The URL encoder converts characters like spaces, ampersands, and accented letters into their percent-encoded equivalents (for example, a space becomes %20). The HTML encoder converts characters like < and > into safe HTML entities (&lt; and &gt;) so they display correctly without being parsed as HTML tags. Both directions — encode and decode — are supported, and all processing happens entirely in your browser with no data sent anywhere.

How to Use This Tool

  1. Choose a tab: Select "URL Encoding" if you are working with links or query strings. Select "HTML Entities" if you are working with content that will appear inside an HTML document.
  2. Paste your text: Type or paste the text you want to encode (or the encoded string you want to decode) into the left-hand input box.
  3. Click Encode or Decode: Press the action button. The result immediately appears in the right-hand output box.
  4. Copy the result: Use the copy icon in the output panel header to copy the converted text to your clipboard.
  5. Swap direction: Use the arrow icon between the buttons to flip the input and output and switch from encoding to decoding (or vice versa) without re-pasting.

Common Use Cases

  • URL query parameters: When you need to pass user-entered text as part of a URL (for example, a search query), encoding ensures special characters like &, ?, and = do not break the link structure.
  • Preventing XSS in HTML: Before inserting user-supplied content into an HTML page, encode it so that characters like < cannot be interpreted as script tags.
  • API payloads and webhooks: Many APIs pass parameters inside a URL. Encoding the values before appending them ensures the request is properly formed even when the value contains reserved characters.
  • Email links and mailto: URIs: Addresses and subjects in mailto: links must be URL-encoded so spaces and special characters in the subject line are handled correctly by email clients.
  • Debugging encoded strings: Decode a garbled percent-encoded URL or an HTML entity string from a log file or API response to read it in plain text.