Skip to content

Tool 41 / Format lines

A number that means a moment.

Turn Unix seconds or milliseconds into a readable date, or take a date and find the timestamp. UTC and local time, side by side.

  • Free to use
  • UTC + local
  • Runs locally
Live workbenchSeconds · 1,700,000,000 s

Auto-detection uses digit count: up to 10 digits is seconds, 11–13 is milliseconds, 14–16 is microseconds, and longer values are nanoseconds. Choose a unit explicitly when the guess is not what you meant.

Converted date
seconds detected unit1,700,000,000 Unix seconds1,700,000,000,000 millisecondsUTC + local timezoneUses your device clock · never uploaded

What it does

A Unix timestamp is a single number that identifies an instant. This tool converts one into a human-readable date and back again. It also exposes the same instant as seconds, milliseconds, an ISO 8601 string, a UTC string, and a local date with the device’s timezone.

Timestamps are compact, sortable, and independent of language and timezone, which is why they appear in logs, APIs, databases, cookies, and filenames. They are also easy to misread: a ten-digit number is usually seconds, a thirteen-digit number is usually milliseconds, and a value that looks plausible in one unit can point to a completely different year in another.

Seconds, milliseconds, and more

The Unix epoch is 1 January 1970 at 00:00:00 UTC. A seconds timestamp counts from there. A milliseconds timestamp counts the same interval in thousandths of a second, so it has three more digits. Microseconds and nanoseconds extend the same pattern. The tool can read all four and will label the unit it used.

Auto-detection is a convenience, not a standard. It uses digit count: up to ten digits is seconds, eleven to thirteen is milliseconds, fourteen to sixteen is microseconds, and longer values are nanoseconds. That covers ordinary dates around the present. If you are working with a far-future date, a deliberately small value, or an API with a fixed unit, choose the unit explicitly and the guess disappears.

Timezones and the epoch

The epoch itself is defined in UTC. UTC is not a timezone with daylight saving; it is the reference clock. Local time is what your operating system shows after applying its timezone rules. The tool prints both. A timestamp does not contain a timezone — it identifies an instant — so there is no “correct” local hour without knowing where the reader is.

Dates before 1970 are negative timestamps. JavaScript dates can represent a very large range, but not every date string is unambiguous. An ISO value with Z or an offset is the safest input. A bare date such as 2026-10-27 is treated as UTC midnight by the ECMAScript date parser, while a bare date-time without an offset is usually local. The output shows the resulting UTC and local forms, so you can catch an unintended reading.

Examples

Seconds to a date
Input: 1700000000 · unit: auto (seconds)

Before

1700000000

After

Unix seconds: 1700000000
Unix milliseconds: 1700000000000
ISO 8601 (UTC): 2023-11-14T22:13:20.000Z
UTC: Tue, 14 Nov 2023 22:13:20 GMT
Local: (your device timezone)
Weekday (UTC): Tuesday

The timestamp is 14 November 2023 at 22:13:20 UTC. The local line depends on the device viewing the page, which is why it is shown as a placeholder here rather than pretending there is one universal local time. The weekday is derived from the UTC date.

An ISO date to Unix seconds
Input: 2000-01-01T00:00:00Z

Before

2000-01-01T00:00:00Z

After

Unix seconds: 946684800
Unix milliseconds: 946684800000
ISO 8601 (UTC): 2000-01-01T00:00:00.000Z
UTC: Sat, 01 Jan 2000 00:00:00 GMT
Local: (your device timezone)
Weekday (UTC): Saturday

Midnight on 1 January 2000 UTC is 946,684,800 seconds after the epoch. The same instant is 946,684,800,000 milliseconds. If the input had no trailing Z, the browser would interpret it in the local zone, and the seconds value could move by hours.

Limits worth knowing

  • Precision stops at milliseconds. JavaScript’s Date stores an integer number of milliseconds. Microsecond and nanosecond inputs are converted to the nearest millisecond; the smaller digits are not preserved.
  • Leap seconds are not modeled. The Date timeline assumes every day has 86,400 seconds. A timestamp at a leap-second boundary can differ by one second from a specialized time scale.
  • Auto-detection can guess wrong. A 13-digit seconds value is unusual, but it is not impossible. The unit selector exists because digit count is a heuristic, not a property of the number.
  • Local means this device. The local output uses the browser’s timezone and daylight-saving rules. A colleague in another zone will see a different local hour for the same instant.
  • It is not a calendar library. It does not handle named timezones such as “Europe/Berlin” as input, recurring events, or calendar arithmetic. Use a dedicated date library when you need those rules.

Page updated

Questions, answered

What is a Unix timestamp?

It is the number of seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. A value of 0 is the epoch. Negative values go before 1970. A millisecond timestamp is the same idea with three extra digits of precision.

How does auto-detection decide between seconds and milliseconds?

It counts the digits before the decimal point. Up to ten digits is treated as seconds, eleven to thirteen as milliseconds, fourteen to sixteen as microseconds, and longer values as nanoseconds. That works for ordinary dates near the present. A far-future seconds value with thirteen digits looks like a millisecond value, so choose the unit explicitly when it matters.

Why is the local time different from the UTC time?

UTC is the same everywhere; local time applies your device’s timezone and daylight-saving rules. The tool shows both so you can check the conversion without guessing. The browser supplies the local zone, so the same timestamp can display a different local hour on another machine.

Does it handle leap seconds?

No. JavaScript dates use a simplified timeline where every day is 86,400 seconds. Leap seconds are not represented, so a timestamp near a leap-second insertion may differ by one second from a specialized time standard. For ordinary scheduling and log work, that difference is irrelevant; for metrology, use a library designed for it.

Can it convert a date without a timezone?

Yes, but the browser decides what that date means. ISO 8601 values with Z or an explicit offset are unambiguous. A string such as 2026-10-27T12:00:00 without an offset is interpreted in the local zone. The output always includes UTC and local forms so you can see the result.

Is the timestamp sent anywhere?

No. The conversion happens in this browser tab. There is no server request, clock lookup, or stored history. The device clock is used only when you press “Use current time.”

All tools →