onnx2json
Exports the ONNX file to a JSON file or JSON dict.
Decision gist · record as of 2026-08-14
Yes, if you need to convert ONNX models to JSON and are working with models from before early 2023. The package is stable, has no dependencies, and carries no known vulnerabilities. However, do not rely on it for long-term maintenance or support for cutting-edge ONNX features—it is abandoned. If you need active development or compatibility with the latest ONNX specifications, consider alternatives or maintain a fork.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- The ONNX model file must exist at the specified path.
- Installs with no runtime dependencies and low friction.
License · maintenance · safety
MIT License (permissive) — MIT License permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
last release 2023-01-25 (1297 days) · last repo commit 2023-01-25 · 33 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 82,977 downloads/mo, #14,111 on PyPI
Alternatives
Verify before relying
pip install onnx2json
from onnx2json import convert
onnx_json = convert(
input_onnx_file_path="model.onnx",
output_json_path="model.json",
json_indent=2
)- Whether the package handles all ONNX opset versions correctly or only specific versions.
- Performance characteristics when converting large or complex ONNX models.
- Compatibility with recent ONNX library versions released after 2023.
What it is and what it does
onnx2json is a command-line and Python library tool that serializes ONNX (Open Neural Network Exchange) model files into JSON format. It reads a binary ONNX file and outputs either a JSON file or an in-memory dictionary representation of the model's structure, graph, and metadata. The tool supports customizable JSON indentation and can work with pre-loaded ONNX graph objects.
The package is designed for developers who need to inspect, analyze, or transform ONNX models in a human-readable or programmatically accessible format. It has no runtime dependencies beyond Python itself, making it lightweight to install. However, it is no longer actively maintained—the last release was in January 2023, and the repository shows no recent commits, meaning it will not receive updates for new ONNX features or Python versions.
Use it for
- Inspect the structure and metadata of an ONNX neural network model for debugging or documentation.
- Convert ONNX models to JSON for integration with web-based model viewers or analysis tools.
- Programmatically extract and manipulate ONNX model information in Python scripts.
- Serialize ONNX graphs to JSON as an intermediate step in model transformation pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to convert ONNX models to JSON and are working with models from before early 2023.
The package is stable, has no dependencies, and carries no known vulnerabilities. However, do not rely on it for long-term maintenance or support for cutting-edge ONNX features—it is abandoned. If you need active development or compatibility with the latest ONNX specifications, consider alternatives or maintain a fork.
Install
onnx2json on PyPI
Before you install
Installs with no runtime dependencies and low friction. However, the package is abandoned—last release was 2023-01-25 and no commits since then. It will not receive updates or security patches.
Requires Python 3.6 or later. The ONNX model file must exist at the specified path.
License in practice
MIT License permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
Quickstart
pip install onnx2json
from onnx2json import convert
onnx_json = convert(
input_onnx_file_path="model.onnx",
output_json_path="model.json",
json_indent=2
)
Verify before relying
- Whether the package handles all ONNX opset versions correctly or only specific versions.
- Performance characteristics when converting large or complex ONNX models.
- Compatibility with recent ONNX library versions released after 2023.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,297 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,977 / month, #14,111 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: onnx2json-2.0.4-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 › “export onnx model json”
- onnx2jsonConverts ONNX model files to JSON format, either writing to a file or…
- json2onnxConverts JSON files to ONNX model format, accepting either a JSON…
- sed4onnxEncodes and decodes Base64-formatted constant values for ONNX model…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also json2onnx · sed4onnx · simple-onnx-processing-tools · sng4onnx · ssc4onnx · sde4onnx · sod4onnx · sio4onnx · ssi4onnx · soc4onnx