Convert epoch time to a readable date, and back
This Unix timestamp converter turns an epoch value into a date you can read — in UTC, in your own time zone and in any other — and turns a date and time back into a timestamp. It recognises seconds, milliseconds, microseconds and nanoseconds automatically, also reads ISO 8601 and other date strings, and shows the result as ISO 8601, RFC 2822, an HTTP date and a relative time such as "3 days ago". A live clock shows the current Unix time, and batch mode converts a whole list at once. Everything runs in your browser.
How to convert a Unix timestamp
- 1Paste a timestamp such as
1700000000or1700000000123into Timestamp → date. The unit is detected from the number of digits; choose it yourself if the guess is wrong. - 2Read the date in UTC, in your time zone and in the zone picked in the toolbar, with ISO 8601, RFC 2822 and relative forms. Click the copy icon next to any of them.
- 3To go the other way, open Date → timestamp, choose a date, time and time zone, and copy the seconds or milliseconds.
- 4To convert many values, open Batch, paste one per line, and copy or download the results as CSV.
What is a Unix timestamp?
Unix time counts the seconds since the Unix epoch, 1 January 1970 at 00:00:00 UTC. It is a single number with no time zone, which makes it ideal for storing and comparing moments: 1700000000 is 14 November 2023 at 22:13:20 UTC everywhere in the world, and only its display depends on where you are.
Times before 1970 are negative — -86400 is 31 December 1969 — and Unix time ignores leap seconds: every day is exactly 86,400 seconds long, so the count stays simple and a leap second is absorbed by the clock rather than counted.
Seconds, milliseconds, microseconds and nanoseconds
Auto-detection goes by the number of digits: up to 11 is seconds, 12 to 14 milliseconds, 15 to 17 microseconds and more nanoseconds. That is right for any date between 1973 and the year 5138. For dates very close to 1970, pick the unit yourself.
- Seconds (10 digits)
- The classic Unix time, used by Unix tools, PHP's time(), Python's int(time.time()), JWT exp and iat claims and most databases. Example: 1700000000.
- Milliseconds (13 digits)
- Used by JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs. Example: 1700000000123.
- Microseconds (16 digits)
- Used by PostgreSQL internally, Python's datetime precision and some logging systems. Example: 1700000000123456.
- Nanoseconds (19 digits)
- Used by Go's time.UnixNano(), InfluxDB and Prometheus. Example: 1700000000123456789 — kept exactly here, since the converter uses arbitrary-precision arithmetic.
Date formats explained
When you paste a date string, any time zone in it is respected. A string with a time but no zone, such as 2024-03-10 08:30, is read as your local time, while a bare date like 2024-03-10 is read as midnight UTC — the rules JavaScript follows — and the converter tells you which happened.
- ISO 8601 / RFC 3339
- <code>2023-11-14T22:13:20.000Z</code> — the format for JSON APIs and databases. Z means UTC; otherwise an offset such as <code>+05:30</code> follows. It sorts correctly as text.
- RFC 2822
- <code>Tue, 14 Nov 2023 22:13:20 +0000</code> — the format of the Date header in email, also used by RSS.
- HTTP date
- <code>Tue, 14 Nov 2023 22:13:20 GMT</code> — the IMF-fixdate format of RFC 9110, always in GMT, used by the Date, Expires and Last-Modified headers and in cookies.
Time zones and daylight saving time
The time zone list holds every IANA zone your browser knows, such as America/New_York, Europe/Berlin or Asia/Kolkata, with their full daylight-saving history. Converting a date to a timestamp has two awkward cases: in spring, a local time such as 02:30 is skipped when the clocks go forward, and in autumn an hour happens twice. The converter reads a skipped time as the moment after the jump and a repeated time as its first occurrence, and says so when either applies.
Store and transmit timestamps or ISO 8601 strings in UTC, and convert to a local zone only for display. For schedules that repeat on a wall-clock time, see the cron expression generator.
The year 2038 problem
Systems that store Unix time as a signed 32-bit integer can count only to 2,147,483,647, which is 19 January 2038 at 03:14:07 UTC. One second later the value overflows to a negative number and reads as December 1901. Modern 64-bit systems are safe for billions of years; check embedded devices, old file formats and database columns declared as 32-bit INT. Paste 2147483647 above to see the moment, or check the bit patterns in the number base converter.
Frequently asked questions
- How do I convert a Unix timestamp to a date?
- Paste it into Timestamp → date. The converter detects whether it is in seconds, milliseconds, microseconds or nanoseconds and shows the date in UTC, your local time and any time zone you choose.
- How do I get the current Unix timestamp?
- The live clock at the top shows it in seconds and milliseconds. In code: Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, time() in PHP and date +%s in a Unix shell.
- How can I tell if a timestamp is in seconds or milliseconds?
- Count the digits. A current timestamp in seconds has 10 digits and one in milliseconds has 13; microseconds have 16 and nanoseconds 19. The converter does this for you and shows which unit it used.
- Is a Unix timestamp in UTC?
- A Unix timestamp has no time zone: it counts seconds since midnight UTC on 1 January 1970, so it names the same instant everywhere. Only when it is displayed as a date does a time zone come in.
- What happens in 2038?
- On 19 January 2038 at 03:14:07 UTC, Unix time passes 2,147,483,647, the largest value a signed 32-bit integer holds. Software still storing time in 32 bits will overflow; 64-bit time is unaffected.
- Can I convert dates before 1970?
- Yes. Dates before the epoch have negative timestamps; -86400 is 31 December 1969 at 00:00 UTC. The converter accepts negative values and returns them for dates before 1970.
- Does Unix time count leap seconds?
- No. Unix time treats every day as exactly 86,400 seconds, so leap seconds are not counted and the timestamp of any date can be computed with simple arithmetic.
- Is anything sent to a server?
- No. All conversion, including time zone rules, runs in your browser using its built-in Intl support.