HTML Entity
Free web tool: HTML Entity
Common HTML Entities
About HTML Entity
This tool combines three essential text encoding and decoding utilities in a single interface: HTML Entity encoding, URL percent-encoding, and Unicode escape conversion. Each mode has its own encode, decode, and reference panel, making it easy to switch between different encoding needs during web development, API work, or data processing.
HTML Entity mode converts special characters like &, <, >, and quotes to their HTML entity equivalents (&, <, >, ") to prevent XSS vulnerabilities and rendering issues. Basic mode encodes only HTML-critical characters, while Full mode converts all non-ASCII characters to numeric entities (&#NNN;) for ASCII-safe output.
URL Encode mode converts strings using percent-encoding (encodeURIComponent), essential for building query parameters, form submissions, and REST API requests. Characters like spaces become %20 and special characters become their %XX hex equivalents. Full mode encodes every character including alphanumerics for maximum compatibility.
Unicode Escape mode converts text to and from the \uXXXX format widely used in JSON strings, JavaScript/TypeScript source code, Java, and C# string literals. This is especially useful for embedding non-ASCII characters in source files, debugging internationalized strings, or preparing text for systems that require ASCII-only input.
All three modes run entirely in the browser with no server communication, making them safe for sensitive data. The Result-to-Input swap button allows chaining operations across modes for complex encoding workflows.
Key Features
- Three encoding modes in one tool: HTML Entity, URL Encode, and Unicode Escape
- HTML Entity: Basic mode for HTML-critical characters, Full mode for complete ASCII-safe output
- URL Encode: Standard percent-encoding (encodeURIComponent) with Full mode for all characters
- Unicode Escape: Convert to/from \uXXXX format for JSON, JavaScript, Java, and C# strings
- Quick-reference panels for each mode with common characters and one-click clipboard copy
- Result-to-Input swap button for chaining encode/decode operations across modes
- Clear button to reset both input and output areas
- Error handling with clear messages for invalid encoded input
- Monospace font for precise character-level inspection of encoded output
- 100% client-side processing with no data sent to any server
- Full dark mode support with responsive layout
- Korean and English bilingual interface
Frequently Asked Questions
What are HTML entities and when do I need them?
HTML entities are special sequences like & for & and < for < that prevent the browser from interpreting characters as HTML markup. You need them when displaying user-generated content in HTML to prevent XSS attacks, when building HTML strings in JavaScript, and when working with email HTML templates. Basic encoding handles the five HTML-special characters plus common symbols; Full encoding additionally converts all non-ASCII characters to numeric entities.
What is URL percent-encoding?
URL percent-encoding (also called URL encoding) replaces unsafe characters in URLs with a % followed by their hexadecimal ASCII value. For example, a space becomes %20 and an ampersand becomes %26. This is required for query string parameters, form data, and any text embedded in a URL. The tool uses encodeURIComponent which encodes all characters except unreserved ones (A-Z, a-z, 0-9, -, _, ., ~).
What is the \uXXXX Unicode escape format?
The \uXXXX format represents a Unicode character using its 4-digit hexadecimal code point. For example, \u0041 is the letter A, \uD55C is the Korean character "han". This format is used in JSON strings (required by the JSON spec for non-ASCII characters), JavaScript/TypeScript source code, Java string literals, and C# strings. It ensures characters are represented in pure ASCII while preserving their meaning.
What is the difference between Encode and Encode All?
In HTML Entity mode, Basic encode only converts the five HTML-special characters and common named entities, while All encode converts every non-ASCII character. In URL Encode mode, standard encode leaves unreserved characters unchanged, while All encode converts every character including letters and digits. In Unicode Escape mode, standard only escapes non-ASCII characters, while All escapes every character including ASCII. Use the All variants when you need guaranteed ASCII-only output.
Can I chain operations across different modes?
Yes. Use the "Result to Input" button to move the output of one operation into the input field, then switch tabs and apply a different encoding. For example, you can URL-decode a string, switch to Unicode Escape mode, and escape the result for use in JSON. This workflow avoids copying and pasting between separate tools.
How does this handle emoji and supplementary characters?
Emoji and characters outside the Basic Multilingual Plane (code points above U+FFFF) are handled correctly. In HTML Entity Full mode, they are converted to numeric entities. In URL Encode mode, they become multi-byte percent-encoded sequences. In Unicode Escape mode, they are converted to surrogate pair sequences (two \uXXXX sequences) since the format uses 16-bit code units.
Is my data safe when using this tool?
Yes. All encoding and decoding happens entirely in your browser using built-in JavaScript functions (like encodeURIComponent, string operations, and regex replacements). No data is transmitted to any server, stored, or logged. This makes it safe for use with API keys, internal URLs, authentication tokens, or any other sensitive content.