Unix Timestamp Converter

Convert epoch seconds, milliseconds or nanoseconds to readable dates in UTC and your local time, or turn a date into a timestamp. Live current time at the top.

Processed locally in your browser
Current Unix time 0
Enter a timestamp or a dateSeconds, milliseconds, microseconds and nanoseconds are detected by digit count

What a Unix timestamp is

Unix time counts the seconds since 1970-01-01 00:00:00 UTC, the Unix epoch, ignoring leap seconds. It is a plain integer with no timezone, which is exactly why it is used for storage and APIs: 1700000000 means the same instant everywhere. Converting it to a calendar date is where timezones come in, and this page shows both UTC and your local zone side by side.

Seconds, milliseconds or more

Different platforms use different units, and mixing them up produces dates in 1970 or in the year 55,000. The converter guesses the unit from the number of digits, and tells you which it assumed in the status line.

Digits (today)UnitTypical source
10secondsUnix date +%s, PHP time(), Python time.time() (as a float), JWT exp/iat
13millisecondsJavaScript Date.now(), Java System.currentTimeMillis(), most JSON APIs from JS backends
16microsecondsPython datetime internals, some databases, .NET ticks are different (100 ns since year 1)
19nanosecondsGo time.Now().UnixNano(), Linux clock_gettime

Reading dates in

The input also accepts ISO 8601 strings (2024-02-29T12:00:00Z, 2024-02-29T12:00:00+02:00), RFC 2822 strings, and the shorthand now, now +2h, now -3d. Two rules from the ECMAScript specification apply: a date-only string such as 2024-02-29 is read as UTC midnight, while a date-time without a zone such as 2024-02-29T12:00 is read as local time. The status line says which interpretation was used.

The 2038 problem

A signed 32-bit integer overflows at 2147483647, which is 2038-01-19 03:14:07 UTC. Systems that still store time in 32 bits (older embedded devices, some file formats and database columns) will wrap to 1901. Anything that stores 64-bit time is fine for the next 292 billion years. The converter flags values beyond the 32-bit limit.

Getting the current timestamp in code

# Shell
date +%s              # seconds
date +%s%3N           # milliseconds (GNU date)
date -u -d @1700000000    # convert back (GNU); macOS: date -u -r 1700000000

# JavaScript
Math.floor(Date.now() / 1000)
new Date(1700000000 * 1000).toISOString()

# Python
import time, datetime
int(time.time())
datetime.datetime.fromtimestamp(1700000000, tz=datetime.timezone.utc)

# Go
time.Now().Unix()
time.Unix(1700000000, 0).UTC()

# SQL
SELECT EXTRACT(EPOCH FROM now())::bigint;            -- PostgreSQL
SELECT to_timestamp(1700000000);                     -- PostgreSQL
SELECT UNIX_TIMESTAMP(), FROM_UNIXTIME(1700000000);  -- MySQL

Notes

  • Leap seconds are not counted; Unix time treats every day as exactly 86,400 seconds. That is a deliberate simplification of POSIX, not a bug in this page.
  • The local zone comes from your browser (Intl.DateTimeFormat().resolvedOptions().timeZone). Daylight-saving offsets are applied per date, so the offset shown may differ from today's.
  • Everything is computed in your browser; the current-time display uses your device clock.
navigateEnter openEsc close