Unix timestamp converter
Turn epoch time into a date you can read, or a date into a Unix timestamp.
This free epoch converter works in your browser. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.
What Unix time is
Unix time counts the seconds since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. It is the same number everywhere in the world at the same moment, which is why systems store time this way and convert to local time only for display. JavaScript and Java use milliseconds; most databases, Unix tools and APIs use seconds.
Recognising the unit
| Digits | Unit | Example |
|---|---|---|
| 10 | Seconds | 1792400000 |
| 13 | Milliseconds | 1792400000000 |
| 16 | Microseconds | 1792400000000000 |
Detect picks the unit from the size of the number, which is right for any date between 1973 and 5138.
The year 2038 problem
Systems that store Unix time in a signed 32-bit number run out on 19 January 2038 at 03:14:07 UTC, when the count passes 2,147,483,647. Modern systems use 64 bits and are not affected.
Worked example: Converting epoch 1794634737 between seconds, milliseconds, UTC, and IST
Take the Unix timestamp 1794634737 (10 digits, measured in seconds since 1970-01-01T00:00:00Z):
- Step 1 — Days since 1 January 1970: Divide by
86,400seconds per day:1,794,634,737 ÷ 86,400 = 20,771 whole dayswith a remainder of20,337 seconds. - Step 2 — Calendar date from 20,771 days: Accounting for the 14 leap years between 1970 and 2026, Day
20,771is 14 November 2026. - Step 3 — Time of day from 20,337 remaining seconds:
20,337 ÷ 3,600 = 5 hours(18,000 s), leaving2,337 s;2,337 ÷ 60 = 38 minutes(2,280 s), leaving57 seconds→2026-11-14T05:38:57Z(UTC). - Step 4 — Local time in India Standard Time (
UTC+05:30, +19,800 s): Adding 5 hours 30 minutes gives2026-11-14 11:08:57 AM IST, and the 13-digit JavaScript millisecond timestamp is1794634737000.
Limits and what this tool cannot do
- POSIX Unix time ignores leap seconds: By POSIX definition, every Unix day contains exactly
86,400seconds (24 × 60 × 60). Historical UTC leap seconds (27 inserted since 1972) are folded/repeated rather than counted as separate Unix seconds. - Auto-detection threshold between seconds, milliseconds, and microseconds: A 10-digit number (
~1.7 × 10⁹) is treated as seconds; a 13-digit number (~1.7 × 10¹², fromDate.now()) is treated as milliseconds; a 16-digit number is microseconds. For dates very close to January 1970 (small integers), verify the unit selector.
Questions
How do I get the current timestamp in code?
JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). Linux shell: date +%s.
Does Unix time depend on time zone?
No. It is always counted from UTC. Only the displayed date depends on your time zone.
Can it show dates before 1970?
Yes. Use a negative timestamp.
How can I tell at a glance if a timestamp is in seconds or milliseconds?
Count the digits: modern dates (between 2001 and 2286) are **10 digits** in seconds (1794634737), **13 digits** in milliseconds (1794634737000), **16 digits** in microseconds, and **19 digits** in nanoseconds.
Does a Unix timestamp change depending on what time zone the server is in?
No! A Unix timestamp is always the number of seconds elapsed since 1970-01-01T00:00:00Z (UTC) simultaneously everywhere on earth. Time zones only affect how that timestamp is formatted into a human-readable clock string.
What happens on 19 January 2038 at 03:14:07 UTC?
Legacy systems that store Unix timestamps as a signed 32-bit integer reach their maximum value of 2,147,483,647 (0x7FFFFFFF) and wrap around to -2,147,483,648 (13 December 1901). Modern 64-bit systems and JavaScript numbers are unaffected.
Related converters and guides
- Cron expression generatorExplain cron schedules in plain English and see the next runs.
- JWT decoderRead the header and claims of a JSON Web Token and check its signature.
- UUID generatorRandom v4 and time-ordered v7 UUIDs, in bulk.
- JSON formatterFormat, validate and minify JSON, with the error position shown.