Skip to content
Toolcroft

Date & Time

Unix Timestamp Converter - Epoch Time to Date & Back

Convert Unix timestamps (epoch time) to human-readable dates and back. Auto-detects seconds vs milliseconds. Shows ISO 8601, RFC 2822, UTC, and local time. Live-ticking current timestamp for developers. Free, browser-based.

Current Unix timestamp

Enable live mode to see it tick

What is a Unix timestamp?

A Unix timestamp (also called epoch time) is the number of seconds (or milliseconds in JavaScript environments) since 1 January 1970, 00:00:00 UTC. It is the most common machine-readable time format because it is timezone-independent and simple to store and compare.

Seconds vs milliseconds: how to tell the difference

A 10-digit number like 1748000000 is almost certainly seconds. A 13-digit number like 1748000000000 is milliseconds. This tool auto-detects the unit based on magnitude (≥ 10¹² -> milliseconds). If you are pasting from JavaScript's Date.now(), you'll get milliseconds. If you are reading from a Unix command-line tool or most REST APIs, you'll get seconds.

Common date formats explained

  • ISO 8601: 2026-01-15T12:30:00.000Z. The international standard. The "Z" means UTC. Widely used in APIs, databases, and logs. Lexicographically sortable.
  • RFC 2822: Thu, 15 Jan 2026 12:30:00 +0000. Used in email headers (SMTP, MIME) and HTTP Date headers.
  • UTC string: Browser-formatted UTC representation.
  • Local time: The date and time adjusted to your browser's timezone.

The Year 2038 problem

On 19 January 2038 at 03:14:07 UTC, 32-bit signed Unix timestamps will overflow, rolling over to a large negative number, representing 13 December 1901. Modern systems use 64-bit integers, which won't overflow for billions of years. This converter handles 64-bit values without issue.

Developer quick reference

  • Date.now(): current timestamp in milliseconds (JavaScript)
  • Math.floor(Date.now() / 1000): current timestamp in seconds
  • new Date(ts * 1000): convert seconds to JavaScript Date
  • date.toISOString(): ISO 8601 string from a Date
  • date.getTime(): milliseconds timestamp from a Date

Timezone pitfalls

Unix timestamps are always UTC - they represent the number of seconds since the Unix epoch in Coordinated Universal Time, with no timezone offset embedded. A common mistake is reading new Date(timestamp).toString() in JavaScript and assuming the result is UTC; toString() actually returns the date in the local timezone. To get UTC, use date.toISOString() (UTC) rather than date.toLocaleString() (local time). The difference can be hours, depending on the user’s location.

Negative timestamps

Dates before January 1, 1970 are represented as negative Unix timestamps. JavaScript handles negative timestamps correctly via new Date(-62135596800000). However, some platforms do not: older Excel DATE functions cannot represent pre-1900 dates at all; MySQL’s TIMESTAMP column type only supports dates from 1970-01-01 to 2038-01-19; PostgreSQL’s TIMESTAMP and TIMESTAMPTZ types correctly handle the full historical range.

Microsecond precision

Most timestamps are in seconds (10 digits) or milliseconds (13 digits), but some modern systems provide microsecond precision (16 digits). Go’s time.Now().UnixMicro() and PostgreSQL’s timestamptz both support microseconds. A quick digit-count heuristic:

  • 10 digits: seconds (e.g. 1748000000)
  • 13 digits: milliseconds (e.g. 1748000000000)
  • 16 digits: microseconds (e.g. 1748000000000000)