List to HTML List Converter

Splits a list on a configurable separator and wraps each item as an HTML <li> inside an Ordered (<ol>) or Unordered (<ul>) list, escaping HTML's reserved characters (&, <, >, ", ') so item text renders literally instead of being interpreted as markup. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

Turning a plain list into HTML markup means wrapping each item in <li> tags, picking <ul> or <ol>, and remembering to escape any special characters, tedious by hand for anything but a tiny list.

This tool does all of that in one step: paste a list, pick ordered or unordered, and get back ready-to-paste, properly escaped HTML markup.

What Is List to HTML List Converter?

A converter that formats a plain delimited list as semantic HTML: a <ul> or <ol> element containing one <li> per list item.

It automatically escapes HTML's reserved characters in item text, so ampersands, angle brackets, and quotes in your data render correctly instead of breaking the markup.

How List to HTML List Converter Works

The input is split into items using the selected separator, blank items are filtered out, and each item's &, <, >, ", and ' characters are escaped to their HTML entities.

Each escaped item is wrapped in `<li>...</li>`, and the resulting lines are nested inside either `<ul>...</ul>` (unordered) or `<ol>...</ol>` (ordered), depending on the toggle.

When To Use List to HTML List Converter

Use it when hand-authoring or generating a static HTML page and you need to insert a bulleted or numbered list from plain-text data.

It's useful for quickly previewing how a plain list will look as real HTML markup, including proper entity-escaping for special characters.

Features

Advantages

  • Automatically escapes HTML-reserved characters, preventing broken markup or unintended tag injection from list data.
  • Produces clean, semantic markup with no extraneous classes or inline styles to strip out later.
  • One toggle switches instantly between ordered and unordered output.

Limitations

  • Every item becomes a flat, single-level <li>; nested sub-lists aren't supported.
  • No styling or attributes (id, class) are added, you'll need to add those yourself if your page's CSS depends on them.

Examples

An unordered list

Input

Milk
Eggs
Bread

Output

<ul>
  <li>Milk</li>
  <li>Eggs</li>
  <li>Bread</li>
</ul>

With the toggle set to Unordered, the three items become <li> children of a <ul> element.

Escaping a special character

Input

Tom & Jerry

Output

<ol>
  <li>Tom &amp; Jerry</li>
</ol>

With the toggle set to Ordered, the ampersand is escaped to &amp; so the markup stays well-formed inside the <ol> element.

Best Practices & Notes

Best Practices

  • Paste the output inside an existing HTML document's <body>, it's a markup fragment, not a complete standalone HTML page.
  • Add your own class attribute after pasting if your site's CSS framework needs one for styling the list.

Developer Notes

Escaping runs a fixed sequence of `String.prototype.replace()` calls, `&` first (so it doesn't double-escape entities introduced by the later replacements), then `<`, `>`, `"`, and `'`, matching the standard order used by most HTML-escaping utilities.

List to HTML List Converter Use Cases

  • Generating the <ul>/<ol> markup for a static site's feature list or FAQ from plain text
  • Converting a list of navigation links' labels into list-item markup before adding href attributes
  • Quickly checking how special characters in a data list will render once wrapped in HTML

Common Mistakes

  • Pasting the output as a complete web page; it's only the list fragment and needs to go inside an existing HTML document.
  • Forgetting that escaped ampersands (&amp;) are correct HTML and will display as a plain "&" once rendered in a browser, not as literal entity text.

Tips

  • Toggle to Ordered when list position/ranking matters (like steps in a process), and Unordered for unordered collections of items.
  • Use List to Markdown List Converter instead if your target is a Markdown file rather than raw HTML.

References

Frequently Asked Questions