Text Utils
By ToolzBank Team•
2 min read
•Monday, October 19, 2026•Updated Monday, October 19, 2026

What Is a Unix Timestamp and How to Convert It to a Date

Unix timestamps count seconds since 1 January 1970 UTC. Learn how to read them, spot seconds vs. milliseconds, and convert them to dates and back.

#unix timestamp#epoch time#timestamp converter#epoch to date

Databases, APIs and log files often store time as a single number such as 1760659200. That is a Unix timestamp — the number of seconds since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. It is compact, has no time-zone ambiguity and is easy to compare, which is why systems love it and people find it unreadable.

Seconds, milliseconds, microseconds, nanoseconds

The same moment can be written with different precision, and the number of digits tells you which:

  • 10 digits — seconds (Unix, many APIs, JWT exp/iat)
  • 13 digits — milliseconds (JavaScript Date.now(), Java)
  • 16 digits — microseconds (some databases)
  • 19 digits — nanoseconds (Go, high-precision logs)

Treating milliseconds as seconds gives a date tens of thousands of years in the future — a common bug.

How to convert a timestamp

  1. Open the Unix Timestamp Converter. The current timestamp is shown live at the top.
  2. Paste a timestamp — the unit is detected from its length.
  3. Read the result in UTC, your local time zone, ISO 8601, RFC 2822, as relative time ("3 days ago") and in major world time zones.
  4. To go the other way, pick a date and time (local or UTC) to get its timestamp.

Converting in code

  • JavaScript: new Date(seconds * 1000).toISOString()
  • Python: datetime.fromtimestamp(seconds, tz=timezone.utc)
  • SQL (PostgreSQL): to_timestamp(seconds)

Timestamps are always UTC; time zones only matter when you display them. For converting clock times between cities, use the World Clock & Time Zone Converter.

Frequently Asked Questions

What is the Unix epoch?

It is 00:00:00 UTC on 1 January 1970, the starting point from which Unix timestamps count seconds.

How do I know if a timestamp is in seconds or milliseconds?

Count the digits: about 10 digits means seconds and 13 digits means milliseconds for current dates. The converter detects this automatically.

Do Unix timestamps include time zones?

No. A Unix timestamp always represents a moment in UTC; the time zone is applied only when it is shown as a date and time.

What is the year 2038 problem?

Systems that store timestamps as signed 32-bit integers overflow on 19 January 2038. Modern systems use 64-bit values, which avoids it.