Unix Timestamp Converter

Instantly convert Unix timestamps (s, ms, µs) to readable dates, or convert dates back to timestamps.

0 Current Unix Seconds
0 Current Milliseconds
Now (Local)

Based on local time

ℹ️ Unix timestamps measure time elapsed since 1970-01-01 00:00:00 UTC. The unit is automatically detected by the number of digits — 10 digits = seconds, 13 digits = milliseconds, 16 digits = microseconds. Values with decimal points (e.g., 1700000000.123) are treated as seconds.

What is the Unix Timestamp Converter?

That long string of numbers in a log file or API response, like `1700000000`, is a Unix timestamp. This tool instantly translates it into a human-readable date. Just paste a timestamp and see the corresponding time in your local zone, UTC, and major cities like New York and London. It automatically detects seconds, milliseconds, or microseconds, and provides standard formats like ISO 8601. Since all conversions happen in your browser, your data never leaves your computer, making it safe for sensitive logs.

How to use

  1. Paste or type a number into the ‘Timestamp → Date’ input field.
  2. The converted date appears instantly in a table, showing relative time, your local time, UTC, and other time zones.
  3. To go the other way, use the calendar under ‘Date → Timestamp’ to pick a specific date and time.
  4. The corresponding timestamp in seconds, milliseconds, and microseconds will be calculated in the results table.
  5. Click ‘Insert Current Time’ to populate both fields with the current time for a quick conversion.

Unix Timestamp Converter guide

How this tool is used in real work, and what to watch out for.

Seconds or Milliseconds? — The Most Common Mistake

The same moment in time can be represented as `1700000000` or `1700000000000`. Unix-like systems, Python, PHP, and MySQL use seconds, while JavaScript and Java use milliseconds. Every time you cross this boundary, off-by-1000 errors happen.

The symptoms are always the same. If you provide a seconds-based value where milliseconds are expected, you'll get a date somewhere in mid-January 1970. If you do the reverse, you'll end up with a date tens of thousands of years in the future. If your date is stuck in 1970 or is ridiculously far off, this is the first thing you should suspect.

  • JavaScript: `Date.now()` is in milliseconds. If an API expects seconds, use `Math.floor(Date.now() / 1000)`.
  • PHP: `time()` is in seconds. `microtime(true)` returns seconds with a decimal part.
  • MySQL: `UNIX_TIMESTAMP()` returns seconds. `FROM_UNIXTIME()` also expects seconds.
  • Python: `time.time()` returns seconds with a decimal part. Use `int()` to truncate it.
This tool automatically detects the unit by the number of digits — 10 for seconds, 13 for milliseconds, and 16 for microseconds. A message like 'Unit detected as: milliseconds' appears to the right of the input field. If the detected unit doesn't match what you expected, that's a sign your value is wrong. The results table shows the timestamp in seconds, milliseconds, and microseconds, so you can pick the one the target system needs.

UTC vs. KST (+9) — Where 9 Hours Appear or Disappear

A timestamp itself has no time zone. The value `1700000000` represents the same instant everywhere in the world. It just looks different depending on where you are: 7:13 AM in Seoul, but 10:13 PM the previous night in London. That's why a phrase like 'convert the timestamp to KST and save it' doesn't make sense. The moment you add or subtract nine hours, it becomes an incorrect timestamp pointing to a different moment in time.

For services operating in Korea, the 9-hour offset problem usually appears in a few common places.

  • The database server's time zone is UTC, but the application interprets it as KST. This causes query results to be off by nine hours. You need to check MySQL's `time_zone` setting and the connection options together.
  • Mixing `DATETIME` and `TIMESTAMP` types. In MySQL, `TIMESTAMP` is converted to and from UTC during storage and retrieval, but `DATETIME` is not. Comparing these two column types will lead to discrepancies.
  • The definition of 'today'. If you run daily statistical aggregations based on UTC midnight, the 'day' will roll over at 9 AM in Korea. For local services, daily metrics should be aggregated based on KST midnight to align with business expectations.
  • Omitting the 'Z' from an ISO string. `2026-07-16T09:00:00Z` and `2026-07-16T09:00:00+09:00` are nine hours apart. A string without the `Z` (for UTC) or an offset will be interpreted based on the parser's own context, which is often its local time zone.
This tool's results table displays the time in Seoul (KST), UTC, New York, and London simultaneously. The 'Date → Timestamp' converter on the right interprets the input based on your browser's local time zone (which would be KST if you are in Korea).

The Year 2038 Problem — It's Still Alive

When you count seconds using a 32-bit signed integer, it will overflow on January 19, 2038, at 03:14:07 UTC (12:14:07 PM KST). One second later, the time wraps around to the year 1901. It may seem like a forgotten issue now that 64-bit systems are common, but you can still run into it.

  • MySQL's `TIMESTAMP` column can only store dates up to 2038-01-19. For dates beyond that, you must use `DATETIME`. Services that handle data like 30-year loan maturities or long-term contract expiration dates are hitting this wall today.
  • 32-bit embedded devices, old routers, and POS terminals will malfunction if their firmware isn't updated.
  • This tool uses JavaScript's `Date` object, so it handles dates beyond 2038 without any issues. Just because a date looks correct here doesn't mean the target system can handle it.
There's a boundary on the other end, too. Dates before 1970 result in a negative timestamp. If a system expects an *unsigned* integer, this negative value will wrap around into a massive future date. Storing birthdates as timestamps will cause errors for anyone born in the 1960s or earlier. The correct solution is to store dates using a proper date type.

ISO 8601 vs. RFC 2822 — Which to Use Where

The results table shows multiple formats because different systems require different formats.

FormatExampleCommon Uses
Unix seconds1700000000Most APIs, Linux logs, JWT `exp` claims
Unix milliseconds1700000000000JavaScript, Java, Kafka
ISO 8601 (UTC)2023-11-14T22:13:20.000ZStandard for JSON APIs. Human and machine-readable.
ISO 8601 (with offset)2023-11-15T07:13:20+09:00When the original local time must be preserved.
RFC 2822Wed, 15 Nov 2023 07:13:20 +0900Email headers, some RSS feeds.
If you're designing a new API, an ISO 8601 UTC string is a safe choice. It's human-readable in logs, and because the time zone information is included in the string, you'll never have to ask 'which time zone was this again?'. On the other hand, if you perform frequent calculations or comparisons and storage size is a concern, an integer timestamp is better.

Common Mistakes with Relative Time

The 'Relative time' at the top of the table shows how long ago or how far in the future a date is. It's a common format for forums and notification lists, but it's surprisingly easy to get wrong when you implement it yourself.

  • Approximating a month as 30 days. Most libraries, including this tool, do this. This means '1 month ago' could actually be 28 days ago or 31 days ago. For screens where precision matters (like contracts or billing), show the actual date instead of a relative time.
  • Clock skew between server and browser. If a user's PC clock is five minutes fast, a post they just wrote might appear as 'in 5 minutes'. You should add logic to handle future dates, for instance, by displaying them as 'just now'.
  • Caching. If '3 minutes ago' is baked into the HTML and cached by a CDN, it will still say '3 minutes ago' long after. It's safer to calculate relative time on the client side.

Frequently asked questions

How do you tell if it's seconds, milliseconds, or microseconds?

The unit is auto-detected by the number of digits. 10-digit numbers are treated as seconds, 13 as milliseconds, and 16 as microseconds. The detected unit is shown above the input box.

Is the data I enter sent to your server?

No. All conversions are performed entirely within your web browser. The timestamps you enter are never sent to our servers, so your data remains private and secure.

Can I see the time in different time zones?

Yes. The results table shows the time in your local zone, UTC, and key cities like Seoul, New York, and London, which is useful for working with global teams or servers.

What is a Unix timestamp or Epoch time?

It's the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This standard is used by computers to represent a point in time universally, avoiding time zone issues.