DevOps

Unix Timestamp Converter

Convert a Unix timestamp in seconds or milliseconds to a readable date in local time, UTC and ISO 8601, and convert dates back. Runs entirely in your browser.

LogShare Unix Timestamp Converter Runs in your browser · nothing is uploaded

Loading tool…

About the Unix Timestamp Converter

Paste a Unix timestamp (seconds or milliseconds) to see the equivalent date and time, or enter a date to get its timestamp — both shown in your local timezone and in UTC, which is usually what a log line or database column actually stores.

How to use the Unix Timestamp Converter

  1. Paste a timestamp, or enter a date and time.
  2. The other side updates automatically.
  3. Use Now to grab the current timestamp.
  4. Both local time and UTC are shown for the date side.

Step-by-step walkthrough with examples and the errors people hit: Unix Timestamp to Date: A Practical Guide.

Example

Timestamp

1700000000
2023-11-14 22:13:20 UTC

Common errors and how to fix them

The date is in the year 55,000

A millisecond value was read as seconds. Check the digit count: 13 digits is milliseconds.

The time is off by a few hours

One system shows local time and the other UTC. Compare the UTC row, or the ISO string ending in Z.

More problems and fixes in the tutorial

Seconds, milliseconds, microseconds

Unix time counts seconds since 00:00:00 UTC on 1 January 1970. A ten-digit number is seconds; JavaScript, Java and many databases use milliseconds, which have thirteen digits. Some systems go further: sixteen digits are microseconds and nineteen are nanoseconds. This converter detects seconds and milliseconds automatically; for micro- or nanoseconds, drop the last three or six digits first.

Local time, UTC and ISO 8601

A timestamp is a single instant, but it prints differently in every timezone. The converter shows the instant three ways: in your browser's local zone, in UTC, and as an ISO 8601 string ending in Z. When two systems disagree by a whole number of hours, they are printing the same instant in different zones; compare the UTC or ISO forms to be sure.

Convert in code

JavaScript: new Date(ts * 1000) for seconds, new Date(ts) for milliseconds, and Math.floor(Date.now() / 1000) for the current timestamp. Python: datetime.fromtimestamp(ts, tz=timezone.utc) and int(time.time()). Go: time.Unix(ts, 0).UTC(). PostgreSQL: to_timestamp(ts). MySQL: FROM_UNIXTIME(ts). Bash: date -d @ts on Linux or date -r ts on macOS. In every language, decide up front whether your value is seconds or milliseconds; getting it wrong produces dates in 1970 or in the year 55,000.

The current timestamp and the 2038 problem

Press Now to get the current Unix time in seconds and milliseconds. Timestamps stored as signed 32-bit integers overflow on 19 January 2038; modern systems use 64-bit values and are unaffected, but older embedded devices and some database columns are not. If you still see INT columns holding Unix time, plan the migration.

Privacy

Conversion runs in your browser using its clock and timezone database. Nothing is sent to a server.

FAQ

Seconds or milliseconds?

The tool auto-detects based on digit count — 10 digits is treated as seconds, 13 digits as milliseconds, matching how most systems emit timestamps.

What timezone is used?

Both your browser’s local timezone and UTC are shown side by side, since logs and databases are usually in UTC but you’re usually thinking in local time.

How do I get the current Unix timestamp?

Click Now on this page, or run date +%s in a terminal, Date.now() in JavaScript (milliseconds), or time.time() in Python.

Why is my converted date off by a few hours?

One side is showing local time and the other UTC. Compare the UTC row, or the ISO 8601 string that ends in Z, which is timezone-independent.

Are Unix time and epoch time the same thing?

Yes. Epoch time, POSIX time and Unix time all mean seconds since the Unix epoch, 1 January 1970 UTC.

Does Unix time include leap seconds?

No. Unix time pretends every day has exactly 86,400 seconds, so it drifts from UTC by one second at each leap second and is corrected by repeating or skipping a timestamp.