Unix Timestamp Converter
Understand Unix Timestamp Converter
Converts a Unix timestamp into a readable date and back again, detecting automatically whether the number is in seconds or milliseconds.
How it works
Unix time is a single count of seconds elapsed since 1970-01-01T00:00:00Z, the epoch. Because it is anchored to UTC and carries no timezone, it is unambiguous everywhere — the same integer means the same instant in Tokyo and in Chicago, which is why databases, logs, and APIs store it. JavaScript counts milliseconds rather than seconds, so a JS value is a thousand times larger and one common conversion bug is a date in 1970 (you divided when you should have multiplied) or the year 55000 (the reverse). This tool treats a value above 1e12 as milliseconds and everything below it as seconds.
When to use it
- Reading an `iat`, `exp`, or `nbf` claim out of a JWT, or a `created_at` integer out of a database row
- Checking whether a token expiry that "should be valid" is actually in the past
- Turning a log line timestamp into a wall-clock time you can correlate with a deploy or an incident
- Producing a fixed epoch value to paste into a test fixture so the test does not depend on the current time
Watch out for
- The 2038 problem is real and near. A signed 32-bit seconds counter overflows at 2038-01-19T03:14:07Z and wraps to 1901 — embedded systems, old C code, and some database columns still use one.
- The seconds-versus-milliseconds heuristic has an edge. A millisecond timestamp from before September 2001 is smaller than 1e12 and will be read as seconds, giving a date tens of thousands of years out. If the year looks absurd, check the unit.
- Unix time ignores leap seconds by definition. During a leap second the same value is used twice, so a Unix timestamp is not a true count of elapsed SI seconds since 1970 — it is a count of days times 86,400 plus the seconds today.
- Negative timestamps are legal and mean dates before 1970. Plenty of parsers, spreadsheets, and ORMs reject or mangle them.
Frequently Asked Questions
What is epoch time?
Epoch time (or Unix time) is the number of seconds elapsed since the Unix epoch: January 1, 1970 00:00:00 UTC. It is timezone-independent, making it the universal format for storing, comparing, and transmitting datetimes across systems and programming languages.
What is a Unix timestamp?
A Unix timestamp is a single integer representing the number of seconds (or milliseconds in JavaScript) since January 1, 1970 UTC. Databases and APIs use it because it is compact, unambiguous, and sorts correctly. A 10-digit number is seconds; 13-digit is milliseconds.
How to convert Unix timestamp to date?
Paste your timestamp into the input — the tool auto-detects seconds vs milliseconds and shows the corresponding UTC and local date/time. In JavaScript: new Date(timestamp * 1000).toISOString(). In Python: datetime.fromtimestamp(ts, tz=timezone.utc).
How to Use Unix Timestamp Converter
- Paste or type your input in the input area above.
- The tool processes your input automatically or click Run.
- Copy or download the result using the action buttons.
- Use Ctrl+Enter to run quickly from the keyboard.