Unix Timestamp Converter
About the Timestamp Converter
This Unix timestamp converter turns epoch time into ISO 8601, UTC, local and any-time-zone dates, and turns date strings back into epoch seconds and milliseconds. It detects whether a number is in seconds, milliseconds, microseconds or nanoseconds, so you can paste a value straight from a log or database and read it immediately.
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) counts the seconds elapsed since 1970-01-01T00:00:00Z, the Unix epoch. It has no time zone: the same instant is the same number everywhere, which is why servers, databases and APIs use it to store moments in time.
For example, 1700000000 is 2023-11-14T22:13:20Z. Negative values are dates before 1970, so -86400 is 1969-12-31T00:00:00Z. Unix time ignores leap seconds and treats every day as exactly 86,400 seconds.
Seconds vs milliseconds: how to tell them apart
Count the digits. Present-day timestamps in seconds have 10 digits (1700000000), milliseconds have 13 (1700000000000), microseconds 16 and nanoseconds 19. JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds, while date +%s, PHP's time() and most SQL UNIX_TIMESTAMP() functions return seconds.
This converter applies the same rule by magnitude: values below 100,000,000,000 are read as seconds, below 100 trillion as milliseconds, below 100 quadrillion as microseconds, and anything larger as nanoseconds. It shows which unit it picked under the input ("Interpreted as: milliseconds"), so a wrong guess is easy to spot. Very short millisecond values (before March 1973) are therefore read as seconds.
How date strings are parsed
In "Date & Time String" mode the input is parsed by your browser's Date engine, so ISO 8601 is the safest format. Three cases behave differently: a date-only value like 2024-03-31 is treated as UTC midnight, a value with an offset like 2024-03-31T12:00:00+05:30 or a trailing Z is exact, and a date-time without an offset like 2024-03-31T12:00:00 is read in your local time zone.
The tool tells you which of those rules it applied. When you share timestamps with other people or systems, always include Z or an explicit offset.
The year 2038 problem
Systems that store Unix time in a signed 32-bit integer overflow after 2147483647, which is 2038-01-19T03:14:07Z. One second later the value wraps to a negative number and the date jumps back to 1901. Use 64-bit integers (or millisecond values in a BIGINT) for anything that may outlive 2038.
How to Use the Timestamp Converter
- Pick an Input Type ("Unix Timestamp" or "Date & Time String"), then type or paste a value. Press Now for the current time or Load example for a sample.
- Choose a Display Time Zone, such as America/New_York or Asia/Kolkata. Check the "Interpreted as" line to see whether your number was read as seconds, milliseconds, microseconds or nanoseconds.
- Read the result cards (seconds, milliseconds, ISO 8601, UTC, local time, selected zone, relative time), copy any card with its copy icon, or press Download to save all of them as a text file. Clear resets the input.
Timestamp Converter Examples
Epoch seconds to a date in New York
Input type Unix Timestamp, Display Time Zone America/New_York (standard time, UTC-5).
Input:
1700000000
Output:
Interpreted as: seconds Unix Timestamp (ms): 1700000000000 ISO 8601: 2023-11-14T22:13:20.000Z UTC String: Tue, 14 Nov 2023 22:13:20 GMT Selected Time Zone: Tue, Nov 14, 2023, 17:13:20 GMT-05:00
Epoch milliseconds to a date in India
A 13-digit value is detected as milliseconds. Display Time Zone Asia/Kolkata.
Input:
1720000000000
Output:
Interpreted as: milliseconds Unix Timestamp (sec): 1720000000 ISO 8601: 2024-07-03T09:46:40.000Z Selected Time Zone: Wed, Jul 3, 2024, 15:16:40 GMT+05:30
Date string with an offset to epoch
Input type Date & Time String, Display Time Zone Europe/London (British Summer Time applies on this date).
Input:
2024-03-31T12:00:00+05:30
Output:
Unix Timestamp (sec): 1711866600 Unix Timestamp (ms): 1711866600000 ISO 8601: 2024-03-31T06:30:00.000Z Selected Time Zone: Sun, Mar 31, 2024, 07:30:00 GMT+01:00
Common Errors
- "Invalid timestamp: use digits only" when pasting 1,700,000,000, 1700000000 UTC, +1700000000 or 1.7e9.
- Remove thousands separators, units, a leading plus sign and exponent notation. Only digits, an optional leading minus and an optional decimal part are accepted, e.g. 1700000000 or 1700000000.5.
- "Invalid date: try ISO 8601" for a value like 31/03/2024 or 2024-13-45.
- Switch to ISO 8601 (2024-03-31T12:00:00Z). Day-first formats are not understood, and month 13 or day 45 does not exist.
- The converted time is hours off from what the source system shows.
- A date-time without Z or an offset is read in your browser's time zone, as the "Interpreted as" line states. Add Z or an offset like +02:00.
- A small millisecond value such as 86400000 shows a date in 1972 instead of 2 January 1970.
- Numbers below 100,000,000,000 are read as seconds, so short millisecond values are ambiguous. Enter the date as an ISO string instead, or compare against the seconds value shown.
- "Timestamp out of range" for a very long number.
- The value is outside the JavaScript Date range of 8.64 trillion milliseconds either side of 1970. Check for extra digits or a wrong unit.
Frequently Asked Questions
- Is my input sent to a server?
- No. All parsing and formatting happens in your browser with the built-in Date and Intl APIs. Nothing you type leaves your device.
- Why is my converted date off by several hours?
- Usually the date string had no time zone, so it was read as local time, or you are comparing UTC with local time. Add Z or an offset such as +02:00 to make the input unambiguous.
- Why does my timestamp show a date in 1970?
- You probably entered a value in seconds where milliseconds were expected, or the other way around, in your own code. Here, check the "Interpreted as" line; a 13-digit value should read as milliseconds.
- How do I get the current Unix timestamp in code?
- Use Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, time() in PHP or date +%s in a shell.
- What is the largest date this tool accepts?
- The JavaScript Date range: up to 100,000,000 days either side of the epoch, which reaches the year 275760. Larger values show "Timestamp out of range".