Home Tools About Work With Me Blog Contact
Developer Tools

UNIX Timestamps Explained: What They Are and How to Convert Them

2026-06-28 6 min read

If you have ever seen a number like 1735689600 in a database, API response, or log file, that is a UNIX timestamp. Understanding what it is, how to read it, and how to convert it is a foundational skill for any developer working with time-based data.

What is a UNIX timestamp?

A UNIX timestamp is the number of seconds that have elapsed since the UNIX epoch: January 1, 1970, at 00:00:00 UTC. It is a single integer that uniquely identifies any moment in time. The UNIX epoch was chosen somewhat arbitrarily by the original Unix developers, but it has become the global standard for representing time in computing.

As of mid-2026, the current UNIX timestamp is approximately 1,751,000,000.

Why computers use timestamps

Storing time as a single integer has several advantages over storing a human-readable date string:

  • Language-independent — 1735689600 means the same thing in JavaScript, Python, PHP, Go, and every other language
  • Timezone-independent — UNIX timestamps are always UTC. Converting to local time happens at the display layer
  • Easy arithmetic — calculating "is event A before event B" is a simple integer comparison. Calculating "how many days between two dates" is subtraction divided by 86,400
  • Sortable — sorting records by timestamp sorts them chronologically with no parsing needed

Seconds vs milliseconds

Timestamps come in two common formats:

  • Unix seconds — 10 digits, e.g. 1735689600 — the standard in most systems
  • Unix milliseconds — 13 digits, e.g. 1735689600000 — used by JavaScript (Date.now()), Java, and Android

If your timestamp has 13 digits, divide by 1000 to get seconds. The Timestamp Converter tool auto-detects which format you have entered.

Converting timestamps

In JavaScript:

// Current timestamp in seconds
Math.floor(Date.now() / 1000)

// Timestamp to human date
new Date(1735689600 * 1000).toLocaleString()

// Date string to timestamp
new Date('2026-01-01').getTime() / 1000

In Python:

import time, datetime
# Current timestamp
int(time.time())

# Timestamp to datetime
datetime.datetime.fromtimestamp(1735689600)

Common timestamp pitfalls

Forgetting to multiply by 1000 in JavaScript. JavaScript's Date constructor expects milliseconds. new Date(1735689600) is a wrong date — you need new Date(1735689600 * 1000).

Timezone confusion. Timestamps are always UTC. new Date().toString() in JavaScript returns your local timezone, but the underlying value is always UTC. Store timestamps in UTC; convert to local time only for display.

Integer overflow in 32-bit systems. 32-bit signed integers max out at 2,147,483,647 — which corresponds to January 19, 2038 at 03:14:07 UTC. This is the Year 2038 problem: systems using 32-bit timestamps will overflow on that date. Modern systems use 64-bit integers which extend the range by billions of years.

Frequently asked questions

What time zone is a UNIX timestamp in?

UNIX timestamps are always UTC (Coordinated Universal Time) — they have no timezone. When you display a timestamp to a user, you convert it to their local timezone at that point. The timestamp itself always represents the same absolute moment regardless of where in the world it is read.

Can timestamps be negative?

Yes. Negative timestamps represent moments before January 1, 1970. Unix timestamp -86400 is December 31, 1969. Most systems support negative timestamps in 64-bit signed integers, allowing dates back to approximately 292 billion years BC.

What is the difference between Unix time and ISO 8601?

Unix time is an integer (seconds since epoch). ISO 8601 is a human-readable string format: 2026-01-01T12:00:00Z. APIs often accept both. ISO 8601 is easier for humans to read; Unix timestamps are easier for machines to store and compare.

Browse all Developer ToolsExplore Developer Tools →
← All articles

Related articles

Developer Tools
JSON Formatting and Validation Guide
Developer Tools
URL Encoding Complete Guide
Developer Tools
Regex Guide for Beginners