humanize
Python humanize utilities
Decision gist · record as of 2026-08-14
Yes. humanize is a mature, zero-dependency utility with active maintenance, permissive MIT licensing, and broad language support. Install it if you need to display human-readable numbers, durations, or sizes to end users. The low friction and stable API make it a safe, long-term choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with no runtime dependencies.
- Active maintenance—last commit 2026-08-01, release 45 days ago.
- Supports Python 3.10 through 3.15 and PyPy.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
last release 2026-06-30 (45 days) · last repo commit 2026-08-01 · 746 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 72,423,518 downloads/mo, #463 on PyPI
Alternatives
Verify before relying
pip install humanize
import humanize
import datetime as dt
humanize.naturaltime(dt.datetime.now() - dt.timedelta(seconds=1))
# 'a second ago'
humanize.naturalsize(1_000_000)
# '1.0 MB'- Exact count of supported languages beyond the list provided in the description.
What it is and what it does
humanize is a utility library that transforms raw numbers, dates, and times into natural language strings suitable for display to end users. It handles common conversions: integers to comma-separated or word forms (12345 → "12,345" or "123.5 million"), time deltas to fuzzy descriptions ("3 minutes ago"), file sizes to human-readable units (bytes → "1.0 MB"), and fractional numbers to readable fractions (0.3 → "3/10"). The package includes localization for Arabic, Basque, Bengali, Brazilian Portuguese, Catalan, Danish, Dutch, Esperanto, European Portuguese, Finnish, French, German, Greek, Hebrew, Indonesian, Italian, Japanese, Klingon, Korean, Latvian, Norwegian, Persian, Polish, Russian, Simplified Chinese, Slovak, Slovenian, Spanish, Swedish, Turkish, Ukrainian, Uzbek, and Vietnamese.
The library is pure Python with zero runtime dependencies, making it trivial to add to any project. It supports modern Python versions (3.10–3.15) and PyPy, and has been actively maintained since its first release in 2011. Use it whenever you need to display quantities, durations, or dates to users in a natural, readable form rather than raw machine-readable formats.
Use it for
- Display file upload/download sizes in web or desktop UIs ("976.6 KiB" instead of bytes).
- Show elapsed time in logs or dashboards ("an hour ago" instead of Unix timestamps).
- Format large numbers in reports or analytics dashboards ("123.5 million" instead of raw integers).
- Localize time and quantity displays for international audiences without manual translation.
- Convert precise time deltas to readable summaries ("2 days, 1 hour and 33.12 seconds").
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
humanize is a mature, zero-dependency utility with active maintenance, permissive MIT licensing, and broad language support. Install it if you need to display human-readable numbers, durations, or sizes to end users. The low friction and stable API make it a safe, long-term choice.
Install
humanize on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance—last commit 2026-08-01, release 45 days ago. Supports Python 3.10 through 3.15 and PyPy.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install humanize
import humanize
import datetime as dt
humanize.naturaltime(dt.datetime.now() - dt.timedelta(seconds=1))
# 'a second ago'
humanize.naturalsize(1_000_000)
# '1.0 MB'
Verify before relying
- Exact count of supported languages beyond the list provided in the description.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 45 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 72,423,518 / month, #463 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 :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming 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 :: PyPyTopic :: Text ProcessingTopic :: Text Processing :: General |
Evidence: humanize-4.16.0-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 › “fuzzy duration strings”
- humanizeConverts numbers, dates, times, and file sizes into human-readable…
- durationpyConverts between Python's `datetime.timedelta` and Go-style duration…
- isodurationParses and manipulates ISO 8601 duration strings (like…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also human-readable · ago · timeago · humanreadable · delta · jinja2-humanize-extension · num2words · moment · arrow