Unix timestamp converter
Turn an epoch timestamp into a readable date in any time zone, or a date and time into a timestamp.
Runs entirely in your browser
Current Unix time
- Seconds
- 0
- Milliseconds
- 0
Timestamp to date
Type or paste a timestamp.
- UTC
- Your time zone
- ISO 8601
- ISO 8601 with offset
- RFC 2822
- Relative
- Seconds
- Milliseconds
Date to timestamp
Pick a date.
- Seconds
- Milliseconds
- ISO 8601 (UTC)
Timestamps up to about 270,000 years either side of 1970, the range a browser can represent; typed dates from year 1 to 9999. Time-zone rules come from your browser's built-in time-zone data.
How to convert a Unix timestamp
- Paste a timestamp into Timestamp to date. The unit (seconds, milliseconds, microseconds or nanoseconds) is detected from its length, and you can change it.
- Pick a time zone to see the date there as well as in UTC, ISO 8601 and RFC 2822 form.
- To go the other way, enter a date and time under Date to timestamp; it is read in the time zone you picked.
How epoch time works
A Unix timestamp counts seconds from the Unix epoch, midnight UTC on 1 January 1970. Because it names a moment rather than a clock reading, the same number means the same instant in Manila, London and New York. Converting it to a date is where time zones come in: the tool uses your browser's time-zone database, the same rules your operating system uses, to work out the local offset and daylight saving at that moment.
Many systems use finer units. JavaScript and Java count milliseconds, some databases and Python's time.time_ns() use microseconds or nanoseconds. Pasting such a value as seconds gives a date tens of thousands of years away, so the tool guesses the unit from the number's size and shows which it chose. Microsecond and nanosecond values keep their extra digits in the ISO 8601 line.
Going from a date to a timestamp needs a time zone, because 09:00 happens at a different moment in each zone. The date you type is read as a clock reading in the zone you pick. Readings that fall in a daylight-saving gap or overlap are flagged, so you know which instant you got.
Tips
- Schedules written as cron expressions can be checked with the Cron expression explainer, which lists the next run times in any zone.
- UUID version 7 values carry a millisecond timestamp; the UUID generator can read it.
- Tidy a JSON response full of timestamps with the JSON formatter.
Questions
What is a Unix timestamp?
It is the number of seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is the same everywhere in the world at a given moment, which is why it is used to store times; the time zone only matters when you turn it into a date someone reads.
How is the unit detected?
By size. A value under 100 billion is read as seconds (that covers dates up to the year 5138), up to 100 trillion as milliseconds, up to 100 quadrillion as microseconds, and anything larger as nanoseconds. A 10-digit number is seconds, 13 digits milliseconds, 16 microseconds and 19 nanoseconds. If the guess is wrong, choose the unit yourself.
What happens to a time that doesn't exist because of daylight saving?
When clocks spring forward, an hour of local time is skipped. A date and time inside that gap is moved forward by the length of the gap, which is what most software does, and the tool says so. When clocks fall back, an hour happens twice; the tool uses the first occurrence and shows the timestamp of the second as well.
Can timestamps be negative?
Yes. Negative values are moments before 1970: -1 is 23:59:59 UTC on 31 December 1969. Dates far in the past use the proleptic Gregorian calendar, as ISO 8601 does.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit number can count only up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the value overflows. The tool points this out when a timestamp is beyond that range. Most current systems use 64-bit time and are not affected.
Are leap seconds included?
No. Unix time treats every day as exactly 86,400 seconds, and so does JavaScript, so the 27 leap seconds added since 1972 are not counted. This is normal and matches what servers, databases and programming languages report.