Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

HTML Entity Encoder & Decoder

Escape text into HTML entities or decode entities back to plain text. Choose named or numeric entities, escape only the unsafe characters or everything outside ASCII, and read the result live.

Everything runs locally in your browser. Your data never leaves your device.

Conversion

Only the five HTML-reserved characters (& < > " ') are escaped. Characters with a named entity use it, everything else becomes a hex reference.

Common entities

The characters people look up most, with every spelling ready to copy.

CharacterNamedDecimalHexDescription
Reserved characters
&Ampersand
<Less-than sign
>Greater-than sign
"Double quotation mark
'Apostrophe, single quote
Spaces and dashes
 Non-breaking space
En space
Em space
Thin space
­Soft hyphen
En dash
Em dash
Quotes and punctuation
Left single quotation mark
Right single quotation mark
Left double quotation mark
Right double quotation mark
Single low quotation mark
Double low quotation mark
«Left angle quotation mark
»Right angle quotation mark
Horizontal ellipsis
·Middle dot
Bullet
Dagger
Double dagger
§Section sign
Pilcrow, paragraph sign
Per mille sign
Prime, minutes, feet
Double prime, seconds, inches
Currency
Euro sign
£Pound sign
¥Yen sign
¢Cent sign
¤Generic currency sign
Legal marks and units
©Copyright sign
®Registered trademark sign
Trademark sign
°Degree sign
±Plus-minus sign
µMicro sign
²Superscript two
³Superscript three
½Fraction one half
¼Fraction one quarter
¾Fraction three quarters
Math
×Multiplication sign
÷Division sign
Minus sign
Not equal to
Less than or equal to
Greater than or equal to
Almost equal to
Identical to
Infinity
N-ary summation
N-ary product
Square root
Integral
Partial differential
For all
There exists
Element of
Not an element of
Empty set
Intersection
Union
Subset of
Superset of
Logical and
Logical or
¬Not sign
Nabla, gradient
Arrows
Left arrow
Up arrow
Right arrow
Down arrow
Left-right arrow
Left double arrow
Right double arrow
Left-right double arrow
Carriage return arrow
Greek letters
αGreek small letter alpha
βGreek small letter beta
γGreek small letter gamma
δGreek small letter delta
εGreek small letter epsilon
ηGreek small letter eta
θGreek small letter theta
λGreek small letter lambda
μGreek small letter mu
πGreek small letter pi
ρGreek small letter rho
σGreek small letter sigma
τGreek small letter tau
φGreek small letter phi
χGreek small letter chi
ψGreek small letter psi
ωGreek small letter omega
ΔGreek capital letter delta
ΣGreek capital letter sigma
ΩGreek capital letter omega
ΠGreek capital letter pi

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the HTML Entity Encoder & Decoder Tool

This tool converts text to and from HTML character references. In encode mode it escapes the characters that would break your markup, in decode mode it turns references like &amp and &#8364 back into readable text, live as you type.

You choose how far the encoder goes and how the result is written. Escape only the five reserved characters, or everything outside printable ASCII too, and write the output as named entities, decimal references or hex references.

What you can do

  • Escape HTML special characters so text is safe to place inside markup.
  • Decode HTML entities back to plain text, covering named, decimal and hex references.
  • Convert accented letters, symbols and emoji into plain-ASCII entities.
  • Choose named entities, decimal or hex numeric references for the output.
  • Look up common entities in a searchable table and copy any of their spellings.

How to use the HTML Entity Encoder & Decoder

  1. 1Pick Encode or Decode.
  2. 2Paste or type your text into the input pane. The result updates as you type.
  3. 3When encoding, choose which characters to escape and whether they are written as names, decimal or hex numbers.
  4. 4Copy or download the result, or press Swap with result to convert it back.

What gets escaped

The default scope escapes the five characters HTML reserves: the ampersand, both angle brackets and both quote characters. That is exactly what you need to show code or user input inside a page without it being parsed as markup.

The wider scope also converts every character outside printable ASCII, so accented letters, typographic quotes, dashes, symbols and emoji all become plain-ASCII references that survive any charset. Tabs and line breaks stay as they are. In named style, a character without a name in the WHATWG entity list falls back to a hex reference.

How decoding handles edge cases

Decoding covers the full WHATWG named entity list, 2231 names in all, plus decimal and hex numeric references with or without the closing semicolon. Emoji and other astral code points come out as real characters, and numeric references in the old windows-1252 range map to the characters authors meant, so &#150 becomes an en dash.

Anything that is not a valid reference is left untouched rather than mangled. A lone ampersand, a made-up name or a broken number stays exactly as it was, and a legacy name without its semicolon only decodes at a word boundary, so a URL like ?page=1&copy=2 keeps its query parameters.

Decoding is single-pass, so double-encoded text needs a second run. For percent-encoded URLs use the URL Encoder & Decoder instead.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Paste anything that looks encoded and this tool works out what was used and undoes it, layer by layer. The whole BaseXX family from Base16 to Base85, binary, URL escapes, HTML entities, ROT13 and gzip, Brotli or Zstandard compression are detected in any combination, and every step of the chain is reported.

Turn any text into a clean URL slug. Transliterates accents and non-Latin scripts to ASCII, with options for the separator, letter case and a length limit. Handles many titles at once, one line per slug.

Escape or unescape a string for JSON, JavaScript, regex, shell, SQL, CSV, XML and more. Paste text, pick the target format and copy the result, in either direction.

Encode text for use in URLs or decode percent-escaped strings back to readable text. Choose component, full-URL or form encoding, unwrap double-encoded strings, and break a URL into its parts with every query parameter decoded.

Format code in JavaScript, TypeScript, JSON, JSON5, HTML, Vue, CSS, SCSS, LESS, Markdown, YAML, GraphQL, XML and SQL. Pick tabs or spaces, set the indent width, and format the input in place with one click.