Install
The tool is on npm as epochtime. It has no dependencies and needs Node.js 18 or newer.
Run it without installing
npx epochtime 1700000000
npx epochtime 017f22e2-79b0-7cc3-98c4-dc0c0c07398f
Install it globally
npm install -g epochtime
epochtime 1700000000
The npm package reads Unix timestamps in every unit and decodes the time inside UUIDs, ULIDs, Discord and X snowflakes, MongoDB ObjectIds, JWTs and more. It makes no network calls. Package page: npmjs.com/package/epochtime. MIT licensed.
Python (PyPI)
pipx install epochtime
epochtime 1700000000
# or, without pipx
pip install epochtime
python -m epochtime 1700000000
The Python package is the same decoder with no dependencies and needs Python 3.9 or newer. On Windows, pip install may put the epochtime command in a folder that is not on your PATH. If the command is not found, use python -m epochtime or install with pipx. Package page: pypi.org/project/epochtime.
Single-file version
The older single-file tool, with date arithmetic (add) and zone options, is still available. It needs no npm.
curl -O https://epochtime.tools/cli/epochtime.js
chmod +x epochtime.js
./epochtime.js now
npm install -g https://epochtime.tools/cli/epochtime-cli-1.0.0.tgz
The usage and options below describe the single-file tool.
Usage
epochtime 1700000000 # convert a timestamp
epochtime "2026-11-17 09:30" -z Asia/Kolkata
epochtime now # current time
epochtime add now +90d # date arithmetic
epochtime add 2026-01-31 1mo # month end clamps to 28 Feb
echo 1700000000 | epochtime -f iso # read lines from stdin
Options
-z,--tzsets the time zone. The default is your system time zone, or theEPOCHTIME_TZenvironment variable.--utcuses UTC.-f,--fieldprints one field only:seconds,ms,us,ns,iso,localorrfc2822. It is handy in scripts.--jsonprints the same JSON as the API.-hprints help and-vthe version.
The exit code is 0 on success, 1 when an input could not be read and 2 for a usage error.
Date arithmetic
add takes a start (a date, a timestamp or now) and an amount such as +90d, -2w or 1y3mo. The units are y, mo, w, d, bd (business days), h, m and s. Calendar units move the date on the wall clock and clock units add elapsed time, as in the date calculator.
Privacy
The tool makes no network requests. It runs the same conversion code as the web pages, on your machine.
Questions
Is it on npm?
Yes. Run npx epochtime 1700000000 or install it with npm install -g epochtime. A single-file version without npm is also on this page.
Does it send my data anywhere?
No. It makes no network requests and has no dependencies.
Does it give the same answers as the website and the API?
Yes. All three use the same conversion rules, and the API and command line tool were checked against each other on 1,500 random inputs.
How does it guess seconds from milliseconds?
By digit count: up to 11 digits is seconds, up to 13 is milliseconds, up to 16 is microseconds and anything longer is nanoseconds.
Need to check the JSON you get back? jsontools.tools formats and validates it.