xmltojson
A Python module and cli tool to quickly convert xml text or files into json
Decision gist · record as of 2026-08-14
Yes, if you need straightforward XML-to-JSON conversion. The package has low install friction, no known vulnerabilities, and permissive licensing. The dormant maintenance status is acceptable for a stable, single-purpose tool, but verify that its JSON output format (which depends on xmltodict's behavior) matches your structural requirements before committing to it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single lightweight runtime dependency.
- Maintenance is dormant—last release was in October 2024, but the repository remains active and unarchived with no recent commits.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.
last release 2024-10-20 (663 days) · last repo commit 2024-10-20 · 13 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 583,420 downloads/mo, #5,893 on PyPI
Alternatives
Verify before relying
import xmltojson
with open('file.xml', 'r') as f:
xml_content = f.read()
result = xmltojson.parse(xml_content)
print(result)- Whether the library preserves XML attributes, namespaces, or other structural metadata in the JSON output
- Performance characteristics on large XML files or deeply nested structures
- Whether round-trip conversion (JSON back to XML) is supported
What it is and what it does
xmltojson is a lightweight Python library that converts XML documents into JSON strings. It wraps xmltodict to provide both a programmatic API and a command-line interface for the conversion task. The library supports reading XML from files, stdin, or direct strings, and can write output to stdout or to a file.
The package is intended for developers who need to transform XML data into JSON format as part of data processing pipelines or integration workflows. It supports Python 3.7 through 3.11 and is marked as production-stable, though development activity has slowed since its last release in October 2024.
Use it for
- Convert XML configuration files to JSON for use in modern web applications or APIs
- Transform XML data exports from legacy systems into JSON for downstream processing
- Batch convert XML documents via the command-line tool in shell scripts or CI/CD pipelines
- Parse XML responses from SOAP or REST services and re-serialize as JSON
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need straightforward XML-to-JSON conversion.
The package has low install friction, no known vulnerabilities, and permissive licensing. The dormant maintenance status is acceptable for a stable, single-purpose tool, but verify that its JSON output format (which depends on xmltodict's behavior) matches your structural requirements before committing to it.
Install
xmltojson on PyPI
Before you install
Low install friction with a single lightweight runtime dependency. Maintenance is dormant—last release was in October 2024, but the repository remains active and unarchived with no recent commits.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.
Quickstart
import xmltojson
with open('file.xml', 'r') as f:
xml_content = f.read()
result = xmltojson.parse(xml_content)
print(result)
Verify before relying
- Whether the library preserves XML attributes, namespaces, or other structural metadata in the JSON output
- Performance characteristics on large XML files or deeply nested structures
- Whether round-trip conversion (JSON back to XML) is supported
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <4.0,>=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagexmltodict |
| Maintenance | Dormant 663 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 583,420 / month, #5,893 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Text Processing :: Markup :: XML |
Evidence: xmltojson-2.0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “xml to json converter”
- xmltojsonConverts XML documents to JSON format via a Python library or…
- dicttoxmlConverts Python dictionaries and other native data types into valid…
- cloudmersive-convert-api-clientA Python client library for the Cloudmersive Document Conversion API,…
Give your agent the search over MCP, or paste the wish link into any chat.
More XML packages
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Defusedxml hardens Python's standard XML libraries against XML bomb attacks and entity expansion exploits by providing drop-in replacements that disable dangerous parsing features by default.
Install it if your application parses any XML from untrusted sources.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts XML to Python dictionaries and back, treating XML parsing and generation like working with JSON.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
See also jc · xmljson · cfn-flip · soup2dict · json2xml · data-to-xml · types-xmltodict · yq · jxmlease