HTML List to JSON

Convert HTML ul and ol lists into structured JSON data for APIs and further processing.

List to JSON

What is HTML list to JSON conversion?

HTML list to JSON reads nested ul, ol, and li relationships and converts menus, outlines, categories, task lists, and navigation into hierarchical JSON. Keep list type and li id or class when useful for frontend components, initial API data, menu configuration, tree controls, and content migration. Native browser DOM parsing handles nesting more reliably than simple regular expressions.

How to use the HTML list to JSON converter

  1. Paste HTML containing ul or ol. script, style, noscript, and template contents are ignored.
  2. Choose whether to keep list types and li id or class. Compact JSON suits transport; formatted JSON suits reading and review.
  3. Convert, review the items and children hierarchy, then copy the JSON or download html-list.json.

Main HTML list to JSON use cases

  • Menus and navigation

    Turn HTML navigation into tree JSON for recursive rendering, menu ordering, and multi-level outline configuration.

  • Categories and tasks

    Nested relationships can become initial API data or tree-component data for outlines, categories, and task lists.

  • Content migration

    Extract outlines and lists from legacy sites or static pages, then import structured JSON into a new system.

  • Browser-side parsing

    Source is parsed with the browser DOMParser without uploading HTML. Follow your security policy for sensitive content.

HTML list to JSON FAQ

Why does output use items and children?

This structure separates current list items from nested lists, allowing frontend code to recursively walk children for menus or trees of any depth.

Are scripts in input HTML executed?

No. The source is parsed with DOMParser, and script, style, noscript, and template nodes are removed before lists are read.

Recommended utilities

You may also need these file utilities