json2html
JSON to HTML Table Representation
What it is and what it does
json2html is a Python library that transforms JSON objects into HTML table markup. It takes JSON input (as a string or Python dict/list) and generates a formatted HTML table, making structured data human-readable and shareable in web contexts.
The package handles arrays of objects by default grouping rows when keys match ("clubbing"), supports custom HTML attributes like id and class on generated tables, and includes XSS protection through HTML escaping of text nodes. It has no runtime dependencies, making it lightweight to install, but has been dormant since 2019 with no updates for modern Python versions.
Use it for:
- Convert API response JSON into an HTML table for email reports or web display
- Transform configuration or data files into human-readable tabular format for documentation
- Generate quick HTML previews of JSON data during development or debugging
- Build web dashboards that display structured JSON data as styled HTML tables
- Export nested JSON records as flat HTML tables with automatic grouping of repeated object keys
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts JSON data structures into HTML tables for human-readable display, with support for nested objects, arrays, and custom table attributes.
Yes, if you need simple JSON-to-HTML table conversion and can tolerate dormant maintenance. The package is lightweight, permissively licensed, and has no dependencies. However, verify compatibility with your Python version first—the lack of updates since 2019 and unspecified Python support mean you may encounter issues on modern Python versions. Not recommended for production systems requiring active maintenance or security updates.
Install
json2html on PyPI
pip
pip install json2htmluv
uv add json2htmlpoetry
poetry add json2htmlInstalling json2html
Before you install
Installation friction is high; the package is dormant with its latest release on 2019-07-03, over 2599 days ago. No runtime dependencies, but the age and lack of recent maintenance may affect compatibility with current Python versions.
License in practice
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install json2html
from json2html import json2html
input_data = {"name": "example", "value": "data"}
html_table = json2html.convert(json=input_data)
Python version compatibility is unspecified; the package was last tested with Python 2.6, 2.7, 3.4, and 3.5, so behavior on modern Python versions is uncertain.
Verify before relying
- Whether the package works reliably on current Python versions without modification
- Whether clubbing behavior and HTML escaping defaults remain appropriate for current use cases
- Whether the package handles deeply nested or very large JSON structures efficiently
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 2,599 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,447,553/month — #3,889 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: json2html-1.3.0.tar.gz
Keywords: json, HTML, Table
Tags
More HTML packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
lxmllxml provides Python bindings to libxml2 and…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
pytablewriterConverts tabular data into formatted tables for…
permissive · top 5,000 on PyPI
jstylesonParses JSON strings that contain…
permissive · top 15,000 on PyPI
json-flattenerConverts nested JSON/YAML objects into flat…
permissive · top 15,000 on PyPI
sttableParses string-formatted tables (with…
permissive · top 15,000 on PyPI
dicttoxmlConverts Python dictionaries and other native…
copyleft · top 5,000 on PyPI
data-to-xmlConverts Python dictionaries and lists into XML…
unclear · top 15,000 on PyPI
tabledatatabledata provides a Python library for…
permissive · top 5,000 on PyPI
tablibTablib converts tabular data between multiple…
permissive · top 5,000 on PyPI
tabulateFormats and prints tabular data in plain text…
permissive · top 1,000 on PyPI