—
Unix → Date
Date → Unix
Further reading: Unix timestamp to date
All conversion is done in your browser. No data is sent to any server.

What Is a Unix Timestamp?

A Unix timestamp (also called epoch time) is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970 — known as the Unix epoch. It is the most widely used system for representing points in time in software because it is a single integer, timezone-independent, and trivially comparable and sortable.

Most programming languages and databases store or transmit timestamps in Unix format. JavaScript uses milliseconds rather than seconds (multiply by 1000 or divide by 1000 to convert), which is the source of one of the most common timestamp bugs — using a millisecond timestamp where a second timestamp is expected, producing dates in the year 2554. Our JSON Formatter can help you inspect API responses that include timestamp fields.

Seconds vs Milliseconds

Unix timestamps in seconds are 10 digits long until November 2286. Millisecond timestamps are 13 digits long. A quick way to tell them apart: if the number is larger than 9999999999 (10 nines), it is almost certainly in milliseconds. This tool auto-detects based on the length of the number you paste.

The Year 2038 Problem

32-bit signed integers can represent Unix timestamps up to 2147483647 — which corresponds to January 19, 2038. Systems that store timestamps in a 32-bit signed integer will overflow on that date. Modern systems use 64-bit integers, which extend the range by billions of years, but embedded systems and legacy databases may still be affected.


Frequently Asked Questions

What is Unix time / epoch time?
Unix time is the number of seconds elapsed since 00:00:00 UTC on January 1, 1970. It is timezone-independent — the same number means the same moment in time everywhere in the world. Timezone offsets are only applied when displaying the time in human-readable form, not when storing or comparing it.
How do I get the current Unix timestamp in code?
In JavaScript: Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds. In Python: import time; int(time.time()). In PHP: time(). In MySQL: UNIX_TIMESTAMP(). In bash: date +%s.
Why does JavaScript use milliseconds instead of seconds?
JavaScript's Date object uses milliseconds since the epoch to allow sub-second precision, which is useful for animations, performance measurements, and event timing. This differs from most Unix utilities which use seconds. The mismatch is a common source of bugs — always check whether a timestamp is 10 digits (seconds) or 13 digits (milliseconds) before using it.
What is the maximum Unix timestamp?
For 32-bit signed integers: 2147483647, which is January 19, 2038 at 03:14:07 UTC. This is the Year 2038 Problem. For 64-bit signed integers (used by all modern systems): the maximum is 9223372036854775807, approximately 292 billion years from now — effectively unlimited.
How do I convert a timestamp to a specific timezone?
Unix timestamps are always UTC. To display in a specific timezone, you apply the UTC offset when formatting. This tool shows both UTC and your local timezone. For programmatic conversion: in JavaScript use toLocaleString(locale, { timeZone: 'America/New_York' }). In Python use the pytz or zoneinfo library.
What date formats can I convert to a Unix timestamp?
This tool accepts any format that JavaScript's Date.parse() recognises, including ISO 8601 (2024-05-20T14:30:00Z), RFC 2822 (Mon, 20 May 2024 14:30:00 +0000), and common human-readable formats like May 20 2024 or 2024-05-20 14:30:00. Ambiguous formats like 01/02/03 are parsed according to browser locale and may give unexpected results — use ISO 8601 for reliability.