Skip to main content
ponderloop

Unix Timestamp Converter

A Unix timestamp is the number of seconds since 00:00:00 UTC on January 1, 1970. The timestamp 1700000000 is Tuesday, November 14, 2023 at 22:13:20 UTC, or 2023-11-14T22:13:20Z. A 13-digit number is usually milliseconds, 16 digits microseconds and 19 digits nanoseconds: the converter works out which from the size, says what it picked, and lets you override it. Paste a timestamp below to see it in UTC and your own time zone, or pick a date, a time and a zone to get the timestamp.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Current Unix time

1700000000

Example value. The live count starts when the page loads.

Timestamp to date

Digits, with an optional minus sign (before 1970) and decimal point.

Date and time

Read as seconds (10 digits, detected from its size)

UTC
Tuesday, November 14, 2023 at 22:13:20 UTC
Your time zone
Shown once the page loads
ISO 8601
2023-11-14T22:13:20Z
RFC 2822
Tue, 14 Nov 2023 22:13:20 +0000
Relative to now
Worked out in your browser
Day of the week
Tuesday
As seconds
1700000000
As milliseconds
1700000000000
As microseconds
1700000000000000
As nanoseconds
1700000000000000000

Date to timestamp

UTC, local (your device’s zone), a city or an ID such as Asia/Kolkata.

Unix timestamp

2026-01-01 00:00:00 in UTC is Unix time 1767225600

Unix seconds
1767225600
Unix milliseconds
1767225600000
Unix microseconds
1767225600000000
Unix nanoseconds
1767225600000000000
UTC
Thursday, January 1, 2026 at 00:00:00 UTC
ISO 8601 (UTC)
2026-01-01T00:00:00Z
UTC offset used in UTC
UTC

Notable Unix timestamps

Each date is the timestamp converted by this tool, in UTC.
Timestamp (seconds)UTC date and timeWhat it is
-21474836481901-12-13 20:45:52 UTCSmallest 32-bit signed value: the earliest date a signed 32-bit time_t can hold
-864001969-12-31 00:00:00 UTCOne day before the epoch
01970-01-01 00:00:00 UTCThe Unix epoch
9466848002000-01-01 00:00:00 UTCThe year 2000 (Y2K)
10000000002001-09-09 01:46:40 UTCOne billion seconds
12345678902009-02-13 23:31:30 UTCThe sequence 1234567890
17000000002023-11-14 22:13:20 UTCThe example above: 1.7 billion seconds
20000000002033-05-18 03:33:20 UTCTwo billion seconds
21474836472038-01-19 03:14:07 UTCLargest 32-bit signed value: the Year 2038 problem
42949672952106-02-07 06:28:15 UTCLargest 32-bit unsigned value: the limit of an unsigned time_t

Seconds, milliseconds, microseconds, nanoseconds

The same moment, 2023-11-14 22:13:20 UTC, in each unit. The converter picks the unit from the size of the whole number (the part before any decimal point) and you can override it. Seconds cover 1970 to the year 5138; milliseconds, microseconds and nanoseconds each start at 1973, where their numbers first reach 100,000,000,000, so any date from March 1973 to the year 5138 is read as intended.
UnitExampleDetected when the absolute value isDates covered (positive values)
seconds10 digits: 1700000000less than 100,000,000,0001970-01-01 to 5138-11-16
milliseconds13 digits: 1700000000000less than 100,000,000,000,0001973-03-03 to 5138-11-16
microseconds16 digits: 1700000000000000less than 100,000,000,000,000,0001973-03-03 to 5138-11-16
nanoseconds19 digits: 1700000000000000000at least 100,000,000,000,000,0001973-03-03 to the year 275,760

Get the current Unix timestamp in code

One-liners for the current time in seconds and in milliseconds. macOS and BSD date have no %N, so use Python or JavaScript there for milliseconds. SQL Server needs DATEDIFF_BIG (2016 and later) because plain DATEDIFF overflows past January 2038.
LanguageSecondsMilliseconds
JavaScriptMath.floor(Date.now() / 1000)Date.now()
Pythonimport time; int(time.time())time.time_ns() // 1_000_000
Bash (Linux, GNU date)date +%sdate +%s%3N
PostgreSQLSELECT extract(epoch FROM now())::bigint;SELECT (extract(epoch FROM clock_timestamp()) * 1000)::bigint;
MySQLSELECT UNIX_TIMESTAMP();SELECT ROUND(UNIX_TIMESTAMP(NOW(3)) * 1000);
SQLiteSELECT strftime('%s', 'now');SELECT CAST((julianday('now') - 2440587.5) * 86400000 AS INTEGER);
SQL ServerSELECT DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME());SELECT DATEDIFF_BIG(MILLISECOND, '1970-01-01', SYSUTCDATETIME());

Convert the timestamp 1700000000 to a date in code

Results are for UTC. The Python line needs from datetime import datetime, timezone. MySQL’s FROM_UNIXTIME uses the session time zone, so it matches only when that is UTC.
LanguageCodeResult
JavaScriptnew Date(1700000000 * 1000).toISOString()2023-11-14T22:13:20.000Z
Pythondatetime.fromtimestamp(1700000000, tz=timezone.utc).isoformat()2023-11-14T22:13:20+00:00
Bash (Linux, GNU date)date -u -d @1700000000Tue Nov 14 22:13:20 UTC 2023
Bash (macOS, BSD date)date -u -r 1700000000Tue Nov 14 22:13:20 UTC 2023
PostgreSQLSELECT to_timestamp(1700000000) AT TIME ZONE 'UTC';2023-11-14 22:13:20
MySQLSELECT FROM_UNIXTIME(1700000000);2023-11-14 22:13:20
SQLiteSELECT datetime(1700000000, 'unixepoch');2023-11-14 22:13:20

Seconds in common periods

Unix time counts every day as exactly 86,400 seconds, so adding these to a timestamp moves it by that many days, weeks or hours (leap seconds are not counted).
PeriodSeconds
1 minute60
1 hour3,600
1 day86,400
1 week604,800
30 days2,592,000
365 days31,536,000

How to convert a Unix timestamp to a date

  1. Paste the timestamp. Type or paste the number, for example 1700000000. Spaces around it, a minus sign for dates before 1970 and a decimal point for fractions of a second are fine.
  2. Check the unit. The converter reports whether it read the number as seconds, milliseconds, microseconds or nanoseconds. If the date looks wrong, choose the unit yourself.
  3. Read the date. The results give the moment in UTC, in your own time zone, as ISO 8601 and RFC 2822, as the day of the week and relative to now. Copy any of them.
  4. Or go the other way. In the date form, pick a date and a time, choose UTC, your zone or any city or IANA zone, and read off the timestamp in seconds, milliseconds, microseconds and nanoseconds.

Frequently asked questions

What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is a count of the seconds that have passed since the Unix epoch, 00:00:00 UTC on January 1, 1970. It has no time zone: 1700000000 means the same instant everywhere and only its display changes (2023-11-14 22:13:20 UTC, or the evening of the same day in New York). Times before the epoch are negative: -86400 is 1969-12-31 00:00:00 UTC.
How can I tell seconds from milliseconds, microseconds and nanoseconds?
By the number of digits. Timestamps for dates in the 2000s and 2020s have 10 digits in seconds, 13 in milliseconds (JavaScript, Java), 16 in microseconds (Python’s time.time() times a million, many databases) and 19 in nanoseconds (Go, some logging systems). The converter treats a whole part under 100,000,000,000 as seconds, under 100,000,000,000,000 as milliseconds, under 100,000,000,000,000,000 as microseconds and anything larger as nanoseconds. A millisecond timestamp from before March 1973 has fewer than 12 digits and looks like seconds, so choose the unit by hand for those.
How do I get the current Unix timestamp in JavaScript, Python, bash or SQL?
JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds. Python: int(time.time()) after import time. Bash on Linux: date +%s. PostgreSQL: SELECT extract(epoch FROM now())::bigint; MySQL: SELECT UNIX_TIMESTAMP(); SQLite: SELECT strftime('%s', 'now'); SQL Server: SELECT DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME()); The tables above also give milliseconds and the reverse conversion. The live counter at the top of the tool shows the current value.
What is the Year 2038 problem?
Systems that store Unix time in a signed 32-bit integer run out at 2147483647, which is 2038-01-19 03:14:07 UTC. One second later the value wraps around to -2147483648, which reads as 1901-12-13 20:45:52 UTC. Systems using a 64-bit integer, which is almost everything modern, are fine for hundreds of billions of years. An unsigned 32-bit value lasts until 4294967295, 2106-02-07 06:28:15 UTC.
Does a Unix timestamp include leap seconds?
No. Unix time pretends every day has exactly 86,400 seconds, so it repeats or smears a second around a leap second rather than counting it. For dates and times in normal use this makes no difference, and it means a timestamp can be turned into a date with plain arithmetic. It is also why differences between two timestamps are off by a few seconds from the true elapsed time across past leap seconds.
Can I use a decimal or negative timestamp?
Yes. A decimal such as 1700000000.5 is read as fractions of the chosen unit, down to the nanosecond, and shows in the ISO result as 22:13:20.5. A negative number is a moment before 1970. The limit is the range browsers can hold, plus or minus 8,640,000,000,000,000 milliseconds, which is the years −271,821 to 275,760; anything beyond is reported as out of range.
How do I convert a date to a timestamp in a particular time zone?
Use the date form: pick the date and time, then type UTC, “local” for your own zone or any city or IANA zone such as America/New_York. Midnight on January 1, 2026 is 1767243600 in New York and 1767225600 in UTC; the difference is the 5-hour offset, 18,000 seconds.
What happens with a time that does not exist because of daylight saving time?
On the spring-forward night the clock skips an hour: in New York on March 8, 2026 it jumps from 1:59 AM to 3:00 AM, so 2:30 AM never happens. The converter moves such a time forward by the length of the gap, so 2:30 AM there is read as 3:30 AM, giving 1772955000, and it tells you so. When the clocks go back, one hour happens twice: the converter uses the first one and offers a checkbox to take the second. JavaScript, Python’s zoneinfo and most calendars handle both cases the same way.
Does the converter send my timestamps anywhere?
No. Everything runs in your browser, using its own time zone database, and nothing you type is sent or stored. The page counts only that the tool was used, never the values.

How it works

A timestamp is read as an exact number of seconds, milliseconds, microseconds or nanoseconds since 1970-01-01 00:00:00 UTC, using integers wide enough that a 19-digit nanosecond value keeps every digit. With the unit on automatic, the size of the whole part picks it (below 1e11 seconds, below 1e14 milliseconds, below 1e17 microseconds, otherwise nanoseconds). The result is split into whole milliseconds, which a JavaScript Date can hold within ±8.64e15, and the nanoseconds left inside that millisecond; the calendar fields come from the UTC calendar, which has no daylight saving, and the local view applies the offset your browser’s IANA time zone database gives for that instant. Relative times use your device’s clock and round down to whole units, with months and years at their average length. The counter at the top reads that same clock once a second. For the reverse direction a date and clock time are resolved in the zone you chose: a time skipped by a spring-forward change is moved forward by the gap and a repeated time uses its first occurrence unless you pick the second. Leap seconds are not counted, as in POSIX. The static example on this page is fixed, so it looks the same whenever it is built.

Sources

All toolsHome & DIY calculators