Unix Timestamp Converter
Convert a Unix timestamp to a date and time in any time zone, or a date and time back to a timestamp.
Runs in your browser. Your input is not sent anywhere.
What this tool does
A Unix timestamp names a moment by counting from 1970-01-01 00:00:00 UTC, a starting point called the epoch. Programs store and compare such numbers easily, but people cannot read them.
The tool converts in both directions. From a timestamp it shows the moment in all four common units, in ISO 8601 notation for UTC and for a time zone of your choice, written out in words, and as a distance from now. From a date and a clock time in a time zone it calculates the timestamp.
How to use it
- Enter a timestamp, or select “Use the current time”.
- Leave the unit on “Detect from the number of digits”, or choose it if you know it.
- Choose the time zone in which you want to read the result.
- To convert the other way, fill in the field “Or a date and time”. It is read as a clock time in the chosen time zone.
The two input fields exclude each other: filling one empties the other. The time zone list comes from your browser and uses the names of the IANA time zone database, such as Europe/Berlin.
How the result is derived
The unit is recognized by the number of digits, not counting the sign and leading zeros. Timestamps of the present have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds.
| Digits before the decimal point | Unit |
|---|---|
| Up to 11 | Seconds |
| 12 to 14 | Milliseconds |
| 15 to 17 | Microseconds |
| 18 or more | Nanoseconds |
Detection is a guess. A timestamp in milliseconds for a moment in 1970, for example, has few digits and is read as seconds. Choose the unit yourself when you know it.
The number is processed as an exact integer of nanoseconds, so that no digit of a long timestamp is lost to rounding. Dates are limited to the range of JavaScript, 100,000,000 days before and after the epoch.
For the other direction the tool looks up which offsets from UTC apply in the chosen time zone around the given date, and keeps each moment whose clock time in that zone equals your input. Usually that is exactly one moment.
Worked example
Seconds: 1700000000
Milliseconds: 1700000000000
UTC: 2023-11-14T22:13:20.000Z
Asia/Tokyo: 2023-11-15T07:13:20.000+09:00
America/New_York: 2023-11-14T17:13:20.000-05:00One moment has different dates in different places: it was already November 15 in Tokyo when it was still the afternoon of November 14 in New York. The timestamp itself has no time zone.
To check by hand: 1700000000 divided by 86400 seconds per day is 19675 days and 80000 seconds. Day 19675 after January 1, 1970 is November 14, 2023, and 80000 seconds are 22 hours, 13 minutes and 20 seconds.
Reference: time zones and their pitfalls
A clock time without a time zone does not name a moment. Where clocks change between standard time and daylight saving time, even a clock time with a zone can name two moments, or none.
| Zone | Date | What happens | Consequence |
|---|---|---|---|
| America/New_York | March 8 | 02:00 becomes 03:00 | 02:30 does not exist |
| America/New_York | November 1 | 02:00 becomes 01:00 | 01:30 occurs twice |
| Europe/Berlin | March 29 | 02:00 becomes 03:00 | 02:30 does not exist |
| Europe/Berlin | October 25 | 03:00 becomes 02:00 | 02:30 occurs twice |
When a clock time occurs twice, the tool uses the earlier moment and shows the later one in a notice. When it does not exist, the tool uses the time moved forward by the length of the gap, and says so.
Unix time does not count leap seconds. Every day has exactly 86400 seconds in this count, so a timestamp cannot name the extra second that is occasionally added to UTC.
Many older systems store the count of seconds in a signed 32-bit integer, whose largest value is 2147483647. That second is 2038-01-19T03:14:07Z. One second later such a counter overflows, which is known as the year 2038 problem.
Common mistakes
- Mixing seconds and milliseconds. JavaScript and Java count milliseconds; most Unix tools, databases and JSON Web Tokens count seconds. A date in 1970 or in a year after 50000 is the typical sign.
- Storing local clock times without a zone and converting them later with another zone.
- Adding 86400 seconds to get “the same time tomorrow”. On the day of a clock change the local day has 23 or 25 hours.
- Using a fixed offset such as +01:00 as if it were a time zone. The offset of a place changes during the year and over the years.
- Formatting numbers with separators. 1,700,000,000 is not accepted, because the tool cannot know which separator is meant.
Sources
Frequently asked questions
- Does a Unix timestamp have a time zone?
- No. It counts from a moment that is defined in UTC, and it is the same number everywhere in the world. A time zone is needed only to write the moment as a date and a clock time.
- How do I know whether my number is in seconds or milliseconds?
- Count the digits. For dates between 2001 and 2286 a timestamp in seconds has 10 digits and one in milliseconds has 13. The tool does this for you and tells you what it assumed.
- Can a timestamp be negative?
- Yes. Negative numbers are moments before 1970. The timestamp -1 is 1969-12-31T23:59:59Z.
- Why is my time zone not in the list?
- The list contains the zones that your browser knows, under their names in the IANA time zone database. These names are regions and cities, for example America/New_York, not abbreviations such as CST or IST, which stand for several zones.
- Where do the rules for daylight saving time come from?
- From the time zone data built into your browser or operating system. The tool contains no rules of its own. If that data is outdated, results for recent or future dates can be wrong in zones whose rules have changed.
Last updated: September 28, 2026