πŸ•’ Unix Timestamp Converter

Convert between Unix epoch seconds and a normal date and time, in both directions.

The Unix Timestamp Converter turns the large 10-digit (or 13-digit) numbers that databases, APIs, and server logs use to store time β€” known as Unix epoch timestamps β€” into a date and time you can actually read. It also works the other way: pick any date and time and it returns the exact Unix timestamp that represents that moment, computed in your local time zone.

A Unix timestamp counts the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC (the "epoch"), ignoring leap seconds. It is the standard way almost all programming languages, databases such as MySQL and Postgres, and JSON APIs store a point in time, because a single number is compact, time-zone-free, and easy to compare. Developers, system administrators, and data analysts reach for a converter daily when they see a field like ts: 1697126400 and need to know what moment that actually was.

This tool accepts both seconds (10 digits) and milliseconds (13 digits) automatically, and correctly handles timestamps before the epoch as negative numbers. Because the conversion runs entirely in your browser, your dates never leave the page.

1697126400⟷Oct 12, 2023 · 16:00 UTCseconds since 1970-01-01 00:00:00 UTC

A Unix timestamp is simply the number of seconds since the Unix epoch. This converter translates it to a human date and back.



How Does the Conversion Work?

When you enter a number, the script first decides whether it is in seconds or milliseconds. Any value whose absolute magnitude is 1 quadrillion (1e15) or more is treated as milliseconds and divided by 1000; a value in the common 10–digit range is read as seconds directly; a 13–digit value is milliseconds and is divided by 1000. The resulting seconds offset from the epoch (1970-01-01 00:00:00 UTC) is turned into a real date by the browser's Date object, then rendered in UTC so that two people in different time zones reading the same timestamp see the same universal moment, just labelled with UTC.

Going the other way, the script reads your local date and time, converts it to a UTC moment, and computes the number of seconds (and milliseconds) since the epoch. This is the value that most systems expect β€” a single, time-zone-independent number.

Practical Examples

An API response that stores an event with ts: 1697126400 is always the same instant no matter where your server lives: October 12, 2023 at 16:00:00 UTC. If a database log records last_login: 1650000000000, that trailing three zeros reveal the value is in milliseconds, which the tool detects and divides by 1000 to give you April 15, 2022 at 09:40:00 UTC. And when you need to store "now" in a program, entering today's date into the second box returns the exact seconds value to save on the server.

Edge Cases and Common Pitfalls

The most frequent mistake is confusing seconds with milliseconds: a seconds timestamp grows by one per second, while a milliseconds timestamp grows by 1000 per second, so they look completely different in the last three digits. This tool detects the scale automatically, but if you are writing code, always confirm which unit your API returns. Another pitfall is timestamps before 1970: the epoch is a reference point, and dates earlier than 1970 are represented by negative numbers (for example, 1969-06-01 is -18489600), which the tool reads correctly. Finally, be aware of the year 2038 problem: timestamps stored in a signed 32-bit integer overflow in January 2038, which is why modern systems use 64-bit integers or milliseconds.

Timezone Notes

The date you see for a given timestamp is always shown in UTC, because that is the anchor the Unix epoch is defined against. When you convert a date and time back to a timestamp, the tool interprets your selection in your browser's local time zone and normalizes it to UTC automatically. This two-hop design means the result you get from a 10-digit timestamp will match what a developer in Tokyo or New York computes for the same number, even though their local clocks read differently.

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp (also called Unix epoch time) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC. It is a single, time-zone-independent number that almost all programming languages and databases use to store a point in time.
Why do I see a 13-digit timestamp instead of 10 digits?
A 13-digit value is in milliseconds rather than seconds. Millisecond timestamps are common in JavaScript (Date.now()) and many newer APIs. This converter detects the difference automatically and divides millisecond values by 1000 before showing the date.
Can the converter handle dates before 1970?
Yes. Any instant before the epoch is represented as a negative Unix timestamp. This tool reads negative values correctly and converts them to their proper historical date.
What is the year 2038 problem?
Timestamps stored in a signed 32-bit integer overflow on January 19, 2038, because the maximum representable positive value is 2,147,483,647 seconds. Modern systems avoid this by using 64-bit integers or millisecond-precision timestamps.
Is the timestamp the same across all time zones?
Yes. A Unix timestamp represents one absolute instant, independent of any time zone. This converter displays it in UTC so you always see the same universal moment, and converts local dates back to that same UTC-normalized number.
Does the tool send my dates to a server?
No. The conversion runs entirely in your browser with JavaScript. Your timestamps and dates are never transmitted or stored anywhere.

Written by Aren Breur β€” IT professional with 30+ years of experience and founder of HowManyDays.app.

Every tool on this site is built, tested, and maintained by hand by Aren to be accurate, fast, and privacy-friendly β€” all calculations run locally in your browser. Found an error or have feedback? Contact us or email aren2connect@gmail.com. Read more about this site.