Unix Timestamp Converter
A bidirectional converter: enter a Unix timestamp (seconds or milliseconds) or a text date, and get seconds, milliseconds, ISO 8601 UTC, and local time — with a Now button and one-click copy.
Results
Enter data and click Calculate.
The Unix epoch (1970)
A Unix timestamp is the number of seconds elapsed since 1970-01-01 00:00:00 UTC — a point called "the epoch." Dates before the epoch have negative values. It’s the simplest way to store time as a single number, independent of time zone or text format.
Timestamps in logs and APIs
- Server logs, message queues, and databases often store time as epoch — easy to sort, compare, and index.
- REST APIs return time as
created_at: 1700000000(seconds) or as ISO 8601 ("2023-11-14T22:13:20Z") — this calculator accepts both input formats. - JWTs use Unix seconds in the
iat,exp, andnbfclaims.
Digit length: seconds vs milliseconds
Mixing units is a common bug (JS Date.now() = ms; many APIs = seconds). Digit length is a quick sanity check.
| Digits | Usually means | Example |
|---|---|---|
| ~10 | seconds since epoch | 1700000000 |
| ~13 | milliseconds | 1700000000000 |
| ~16 | sometimes microseconds | 1700000000000000 |
Seconds vs milliseconds — a common pitfall
JavaScript’s Date.now() returns milliseconds, while many APIs and databases use seconds. Mixing up units produces a date off by thousands of years (treating seconds as milliseconds lands you back near 1970 plus a fraction of a day). Tell-tale sign: a seconds timestamp has about 10 digits (valid until ~2286); a milliseconds one has about 13.
UTC vs local time
A Unix timestamp has no time zone of its own — it always represents the same instant, regardless of where in the world you view it from. The "local time" in the result is that same instant interpreted through your device/browser’s time zone — a different user will see a different wall-clock time for the same timestamp.
Dates before 1970 (negative timestamps)
A timestamp can be negative — it represents a date before the epoch (e.g. -100000 is 1969-12-30). Most modern systems handle this correctly, but some older APIs and binary formats (e.g. 32-bit unsigned) cannot.
Examples
0(seconds) = 1970-01-01T00:00:00Z — the epoch itself.1700000000(seconds) = 2023-11-14T22:13:20Z.1700000000000(milliseconds) = the same instant — just a different unit.
FAQ — Unix timestamps
- How do I tell if a number is seconds or milliseconds?
- Count the digits: ~10 digits means seconds (valid until 2286), ~13 digits means milliseconds. The calculator auto-detects 13+ digit numbers regardless of the selected mode.
- Can I paste a plain date, like 2024-06-15?
- Yes — the field also accepts text dates and ISO 8601, not just numbers.
- What does the "Now" button do?
- It inserts the current timestamp (in the selected seconds/milliseconds mode) and immediately calculates the result.
- How is ISO 8601 different from "local time"?
- ISO 8601 (UTC) is an unambiguous, universal representation of the same instant. "Local time" shows that same instant in your device’s time zone.
- Can a Unix timestamp be negative?
- Yes — it represents a date before 1970-01-01. Most programming languages handle this correctly.
- How far does a 32-bit timestamp reach?
- A classic 32-bit signed int overflows past 2038-01-19 (the "Year 2038 problem"). Modern 64-bit systems don’t have this limit.
- Does JWT use seconds or milliseconds?
- The JWT standard (RFC 7519) defines the
iat/exp/nbfclaims in Unix seconds, not milliseconds. - Does the result depend on my device’s time zone?
- The UTC/ISO field doesn’t — it’s always the same value. The "local time" field depends on the zone set in your browser/OS.