ujson
Ultra fast JSON encoder and decoder for Python
Decision gist · record as of 2026-08-14
Yes-with-conditions. Install if you have an existing ujson dependency or need drop-in compatibility with code already using it. Do not install for new projects: the maintainers explicitly recommend orjson instead, citing both superior performance and lower architectural risk. The maintenance-only status and acknowledged security concerns make this suitable only for stable, low-change workloads.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; compiled wheels available for common platforms but may require build tools on unsupported architectures.
- Medium install friction due to compiled C bindings requiring platform-specific wheels, but well-maintained with recent releases and broad platform coverage (macOS, Linux, Windows, multiple architectures).
- Actively maintained with support for current Python versions.
License · maintenance · safety
BSD-3-Clause AND TCL (permissive) — Dual-licensed under BSD-3-Clause and TCL (permissive licenses), imposing no restrictions on commercial or proprietary use.
last release 2026-06-14 (61 days) · last repo commit 2026-08-13 · 4,496 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 34,789,130 downloads/mo, #754 on PyPI
Alternatives
Verify before relying
pip install ujson
import ujson
ujson.dumps({"key": "value"})
ujson.loads('{"key": "value"}')- Whether performance gains justify migration from standard json library for typical workloads (benchmarks show variability across test cases).
- Current security posture given maintenance-only status and known architectural limitations acknowledged in project documentation.
What it is and what it does
UltraJSON is a C-based JSON encoder and decoder designed as a faster alternative to Python's standard json library. It provides the same core API (dumps/loads) with optional parameters for HTML character encoding, ASCII enforcement, forward-slash escaping, and pretty-printing. The package has no runtime dependencies and works thread-safely without global state.
The project is in maintenance-only mode: new Python version support and critical security fixes are applied, but architectural changes are rejected due to security concerns inherent in the C implementation. The maintainers explicitly recommend migration to orjson for new projects, citing both superior performance and lower vulnerability risk.
Use it for
- High-throughput JSON serialization in data pipelines where encoding speed is a bottleneck.
- Web API responses requiring compact JSON output without pretty-printing overhead.
- Legacy codebases already using ujson that need continued support for newer Python versions.
- Applications requiring HTML-safe JSON encoding for embedded data in HTML contexts.
- Multi-threaded services where thread-safe JSON operations are needed without locking.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes-with-conditions.
Install if you have an existing ujson dependency or need drop-in compatibility with code already using it. Do not install for new projects: the maintainers explicitly recommend orjson instead, citing both superior performance and lower architectural risk. The maintenance-only status and acknowledged security concerns make this suitable only for stable, low-change workloads.
Install
ujson on PyPI
Before you install
Medium install friction due to compiled C bindings requiring platform-specific wheels, but well-maintained with recent releases and broad platform coverage (macOS, Linux, Windows, multiple architectures). Actively maintained with support for current Python versions.
Requires Python 3.10 or later; compiled wheels available for common platforms but may require build tools on unsupported architectures.
License in practice
Dual-licensed under BSD-3-Clause and TCL (permissive licenses), imposing no restrictions on commercial or proprietary use.
Quickstart
pip install ujson
import ujson
ujson.dumps({"key": "value"})
ujson.loads('{"key": "value"}')
Verify before relying
- Whether performance gains justify migration from standard json library for typical workloads (benchmarks show variability across test cases).
- Current security posture given maintenance-only status and known architectural limitations acknowledged in project documentation.
Package facts
| License | BSD-3-Clause AND TCL permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 61 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 34,789,130 / month, #754 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/StableIntended Audience :: DevelopersProgramming Language :: CProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyTyping :: Typed |
Evidence: ujson-5.13.0-cp310-cp310-macosx_10_9_x86_64.whl; ujson-5.13.0-cp310-cp310-macosx_11_0_arm64.whl; ujson-5.13.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; ujson-5.13.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; ujson-5.13.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; ujson-5.13.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ujson-5.13.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ujson-5.13.0-cp310-cp310-musllinux_1_2_aarch64.whl; ujson-5.13.0-cp310-cp310-musllinux_1_2_i686.whl; ujson-5.13.0-cp310-cp310-musllinux_1_2_x86_64.whl; ujson-5.13.0-cp310-cp310-win32.whl; ujson-5.13.0-cp310-cp310-win_amd64.whl; ujson-5.13.0-cp310-cp310-win_arm64.whl; ujson-5.13.0-cp311-cp311-macosx_10_9_x86_64.whl; ujson-5.13.0-cp311-cp311-macosx_11_0_arm64.whl; ujson-5.13.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl; ujson-5.13.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; ujson-5.13.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; ujson-5.13.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ujson-5.13.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.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 › “python json library replacement”
- ujsonUltra-fast JSON encoding and decoding in pure C with Python bindings,…
- condense-jsonCondense JSON by replacing repeated strings and structural patterns…
- flask-orjsonReplaces Flask's default JSON encoder with orjson, a faster JSON…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Replaces Flask's default JSON encoder with orjson, a faster JSON serialization library, to speed up JSON request parsing and response generation in Flask applications.
However, dormant maintenance means you should verify compatibility with your Flask and orjson versions before deploying to production, and be prepared to maintain a…
Fast JSON serialization and deserialization with JSON Schema validation, wrapping the C++ RapidJSON library into a Python 3 extension that handles bytes, strings, and file-like objects.
Provides type hints for JSON serialization library code, enabling static type checkers like mypy and pyright to validate annotated code.
Provides JSON serialization with singledispatch-based type handlers instead of JSONEncoder subclassing, with built-in support for time, date, datetime, UUID, and Decimal types.
Parses and generates Hjson (a human-friendly JSON variant with comments, unquoted keys, and relaxed syntax) and converts between Hjson and standard JSON formats.
However, verify that it supports your target Python version, since classifiers only list up to 3.5 and the last release was 2022; for modern Python projects, confirm…
simplejson encodes Python objects to JSON and decodes JSON strings back to Python objects, with optional C acceleration and support for custom serialization and deserialization hooks.
Install it if you need JSON serialization with custom hooks or must support Python 2.7; otherwise the standard library's json module is sufficient for most use cases.
See also json-numpy · py-ubjson · orjson · php2json