Unix Timestamp Converter
Convert a Unix timestamp to a readable date and back — seconds, milliseconds, microseconds or nanoseconds, detected automatically. See the moment in UTC and your own timezone, convert whole lists at once, and copy the current epoch with one click.
Reading a timestamp by its length
The unit is almost always visible in the digit count, because the ranges do not overlap for any date anyone plausibly means:
| Digits | Unit | Example | That example, decoded |
|---|---|---|---|
| 10 | seconds | 1724668800 | 26 Aug 2024, 10:40 UTC |
| 13 | milliseconds | 1724668800000 | the same instant |
| 16 | microseconds | 1724668800000000 | the same instant |
| 19 | nanoseconds | 1724668800000000000 | the same instant |
JavaScript's Date.now() returns milliseconds; Python's
time.time() returns seconds as a float; Go's
time.Now().UnixNano() returns nanoseconds; most REST APIs
and databases use seconds. When a date renders as 1970 the number was
seconds fed somewhere expecting milliseconds; when it renders tens of
thousands of years out, the reverse.
Constants worth recognising on sight
| Value | Moment | Why it turns up |
|---|---|---|
0 | 1 Jan 1970, 00:00 UTC | the epoch itself; a zero that leaked through as a date |
86400 | 2 Jan 1970 | one day of seconds — a duration mistaken for a moment |
1000000000 | 9 Sep 2001 | the billennium; also a magic number in test data |
2147483647 | 19 Jan 2038, 03:14:07 UTC | the 32-bit signed maximum — the year 2038 problem |
253402300799 | 31 Dec 9999, 23:59:59 UTC | "never expires" in systems capped at four-digit years |
Getting the current timestamp in your own tools
| Environment | Seconds | Milliseconds |
|---|---|---|
| JavaScript | Math.floor(Date.now()/1000) | Date.now() |
| Python | int(time.time()) | int(time.time()*1000) |
| Shell | date +%s | date +%s%3N (GNU) |
| PostgreSQL | extract(epoch from now())::int | (extract(epoch from now())*1000)::bigint |
| MySQL | UNIX_TIMESTAMP() | ROUND(UNIX_TIMESTAMP(NOW(3))*1000) |
Everything on this page runs in your browser; no timestamp you paste is sent anywhere.
Frequently asked questions
What is a Unix timestamp?
A count of seconds since 1 January 1970, 00:00:00 UTC — the Unix epoch. It is a single number with no timezone attached, which is exactly why systems exchange time this way: 1724668800 names the same instant on every machine in the world, and each machine formats it into its own local clock only for display.
How do I tell seconds from milliseconds?
Count the digits. A present-day timestamp in seconds has 10 digits (until the year 2286), in milliseconds 13, in microseconds 16 and in nanoseconds 19. The tool uses the same rule to detect the unit. Getting it wrong does not produce an error — it produces a plausible-looking date in January 1970 or in the year 56638, which is why APIs mixing the two is such a common bug.
Does my timezone change the timestamp?
No. The timestamp itself is the same number everywhere — it counts from a fixed instant in UTC. Your timezone only changes how that instant is written as a wall-clock date. That is why the tool shows both: the UTC form for logs and APIs, and your local form for knowing when something actually happened for you.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit integer run out of room at 2,147,483,647 — which is 19 January 2038, 03:14:07 UTC. One second later the value wraps negative, landing in December 1901. Modern systems store 64 bits and are fine for 292 billion years; the problem lives on in old embedded devices, file formats and database columns declared as 32-bit integers.
Do Unix timestamps include leap seconds?
No. Unix time pretends leap seconds do not exist: every day is exactly 86,400 seconds. When UTC inserts a leap second, Unix clocks repeat or smear a second instead. For converting timestamps this is a feature — arithmetic stays simple — but it means Unix time and true elapsed physical seconds have drifted apart by 27 seconds since 1972.
Why does the batch tab mark a line as invalid?
The batch tab reads one number per line — an optionally signed integer, or a decimal fraction of seconds like Python's time.time() prints. Date strings such as 2024-08-26 are not timestamps and are marked rather than guessed at; convert those on the second tab, which reads a calendar date explicitly.
Related tools
- Diagram & Flowchart MakerDraw flowcharts and diagrams, connect the boxes with arrows that route themselves, and let it arrange the whole thing. Exports SVG. Nothing is uploaded.
- Password GeneratorGenerate strong random passwords using your browser's cryptographic RNG, with a live strength estimate.
- HTML Entity EncoderEncode text for HTML or decode entities back — the five markup breakers, named Latin-1 and symbol sets, numeric references up to emoji. Decodes exactly once.