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 1 January 1970 — the Unix epoch. It is a single integer that unambiguously identifies any moment in time, regardless of timezone.
Unix timestamps are used in virtually every programming language, database, and API. They are easy to store, compare, and do arithmetic with — making them the standard for representing time in software.
Seconds vs milliseconds
Traditional Unix timestamps are in seconds — a 10-digit number as of 2024. Many modern environments (JavaScript's Date.now(), Java, many REST APIs) use milliseconds — a 13-digit number. This tool detects the unit automatically.
- 10 digits → seconds (e.g.
1714000000)
- 13 digits → milliseconds (e.g.
1714000000000)
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds (or milliseconds) elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. It represents any moment in time as a single integer with no timezone ambiguity.
How do I get the current Unix timestamp in code?
In JavaScript: Math.floor(Date.now() / 1000) (seconds) or Date.now() (ms).
In Python: import time; int(time.time()).
In PHP: time().
In Unix shell: date +%s.
In SQL: UNIX_TIMESTAMP() (MySQL) or EXTRACT(EPOCH FROM NOW()) (PostgreSQL).
How do I tell if a timestamp is in seconds or milliseconds?
Count the digits. A timestamp around the current time will be 10 digits if in seconds, or 13 digits if in milliseconds. This tool detects the unit automatically — any input with 12 or more digits is treated as milliseconds.
What is the Year 2038 problem?
Systems that store Unix timestamps as a 32-bit signed integer can only represent values up to 2,147,483,647 — which corresponds to 03:14:07 UTC on 19 January 2038. After that, the counter overflows. 64-bit systems are unaffected and can represent dates billions of years into the future.
What is ISO 8601?
ISO 8601 is an international standard for representing dates and times as strings, for example 2024-04-25T12:00:00.000Z. The trailing Z means UTC. ISO 8601 strings are unambiguous across locales and are the preferred format for APIs and data interchange.
Is this tool free to use?
Yes — completely free with no account or sign-up required. All conversions happen in your browser; nothing is sent to a server.
What is epoch time?
Epoch time is another name for Unix time — the number of seconds elapsed since the Unix epoch (00:00:00 UTC on 1 January 1970). The terms "epoch time", "Unix time", "Unix timestamp", and "POSIX time" all refer to the same concept.
How do I convert an epoch timestamp to a human-readable date?
Paste the timestamp number into the "Timestamp → Date" panel and click Convert (or press Enter). The tool automatically detects whether the value is in seconds or milliseconds and outputs the UTC date, your local time, ISO 8601 string, and relative time (e.g. "3 days ago").
How do I convert a date to a Unix timestamp?
Use the "Date → Timestamp" panel on the right. Pick a date and time using the date picker — the panel outputs the corresponding Unix timestamp in both seconds and milliseconds, plus the UTC string and ISO 8601 format.