Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. Supports seconds, milliseconds, microseconds and nanoseconds. Shows UTC and local time. Free, browser-based.

  • Runs in your browser
  • Your data never leaves your browser
  • Free · No Sign-Up

Timestamp → Date

Auto unit counts integer digits: up to 12 means seconds, 13–15 milliseconds, 16–18 microseconds, and 19 or more nanoseconds. Choose a unit to override this. Sub-millisecond digits are discarded. Changing the unit converts nonempty input immediately.
Convert the timestamp after editing it, or press Enter in its field. Ctrl/⌘+Enter also runs this action. Results show Unix seconds, milliseconds, ISO 8601, UTC and the browser’s local time.
Fill the timestamp with the current time and convert it. Seconds and Auto unit use whole seconds; milliseconds retain the current millisecond value. Microseconds and nanoseconds append zeros without adding clock precision.
Enter decimal digits with an optional sign and fraction. Spaces around the value are ignored. Exponents, hexadecimal and thousands separators are rejected. Dates must fall within ±8,640,000,000,000,000 milliseconds of the epoch.

Date → Timestamp

Select a local date and time. Results update when the value changes, using your browser’s time zone. The same selection can represent a different instant on a computer in another zone.
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

About Unix Timestamps

The Unix epoch began at 1970-01-01 00:00:00 UTC. Every moment in time is stored as an integer offset from that point. Most systems use seconds; JavaScript uses milliseconds.

The 32-bit signed timestamp will overflow (the Year 2038 problem) on January 19, 2038. Modern 64-bit systems are not affected.

Examples

With the unit set to Auto unit, the converter counts the digits before any decimal point: up to 12 digits are seconds, 13–15 milliseconds, 16–18 microseconds, and 19 or more nanoseconds. Present-day values have 10, 13, 16 and 19 digits. The status line says which unit it used; choose a unit from the list to override it.

InputRead asISO 8601 (UTC)
1700000000seconds2023-11-14T22:13:20.000Z
1700000000123milliseconds2023-11-14T22:13:20.123Z
2147483647seconds2038-01-19T03:14:07.000Z
1700000000123456microseconds2023-11-14T22:13:20.123Z
1700000000123456789nanoseconds2023-11-14T22:13:20.123Z

2147483647 is the largest value a signed 32-bit integer can hold, which is where the Year 2038 problem starts. The last two rows are a microsecond timestamp (Python time.time_ns() // 1000, PostgreSQL internals) and a nanosecond one (Go time.Now().UnixNano(), date +%s%N); digits below the millisecond are dropped, because a JavaScript date holds whole milliseconds. Nanosecond values are larger than 253, so the tool reads them as big integers instead of floating-point numbers.

What each result row means

Converting 1700000000 gives five rows:

RowValueNotes
Unix (s)1700000000Whole seconds, rounded down
Unix (ms)1700000000000What Date.now() and Java System.currentTimeMillis() return
ISO 86012023-11-14T22:13:20.000ZAlways UTC (Z) with milliseconds, from Date.prototype.toISOString
UTCTue, 14 Nov 2023 22:13:20 GMTThe HTTP date format of RFC 9110 §5.6.7, used in Date, Expires and Last-Modified headers
Local (UTC+09:00)2023-11-15 07:13:20Your computer’s time zone; the label shows its offset on that date (here Tokyo)

Date to Timestamp across time zones

The date picker has no time zone field, so the same wall-clock time gives different timestamps on different computers. Picking 2026-01-01 09:00:00 returns 1767225600 (2026-01-01T00:00:00.000Z) on a computer set to Asia/Tokyo, and 1767276000 (2026-01-01T14:00:00.000Z) on one set to America/New_York. The ISO 8601 row shows which instant you actually selected. To work with a zone other than your own, use the Timezone Converter.

Accepted input

The timestamp field takes anything JavaScript’s Number() reads as a number. Spaces around the value are ignored.

  • Negative values are dates before 1970: -86400 is 1969-12-31T00:00:00.000Z.
  • Fractions of a second are kept in the millisecond row: 1700000000.5 gives 1700000000500.
  • Exponent notation counts as a short number: 1e9 is read as seconds, giving 2001-09-09T01:46:40.000Z.
  • Dates as text, such as 2024-05-01, are rejected with “Invalid timestamp”. Use the date picker for those.

Do It in Code

date +%s                      # current timestamp (Linux, macOS)
date -u -d @1700000000        # GNU date (Linux)
date -u -r 1700000000         # BSD date (macOS)
Math.floor(Date.now() / 1000)          // current timestamp in seconds
new Date(1700000000 * 1000).toISOString()  // "2023-11-14T22:13:20.000Z"
import time, datetime
int(time.time())                                                  # current timestamp
datetime.datetime.fromtimestamp(1700000000, datetime.timezone.utc)  # 2023-11-14 22:13:20+00:00

Limits

  • Automatic unit by length only. A millisecond value from before 2001-09-09 has 12 digits and is read as seconds, and a seconds value of 13 digits or more (after year 33658) is read as milliseconds. Choose the unit in those cases.
  • Digits only. Exponents (1e10), hexadecimal and thousands separators are rejected; a decimal part is accepted.
  • Date to Timestamp uses your local time zone. The date picker value is read in your browser’s time zone, so the same picker value gives different timestamps on computers set to different zones.
  • No leap seconds. Unix time ignores leap seconds, as does JavaScript’s Date.
  • Range. JavaScript dates cover ±8,640,000,000,000,000 ms from the epoch, about 273,790 years each way (ECMA-262 §21.4.1.1). With the unit set to milliseconds, 8640000000000000 converts to +275760-09-13T00:00:00.000Z; one more millisecond gives “Timestamp out of range.”

FAQ

What is a Unix timestamp?

A Unix timestamp (also called Epoch time) is the number of seconds elapsed since January 1, 1970 00:00:00 UTC. It is the universal time reference in computing.

Seconds or milliseconds — how do I tell?

A 10-digit number is almost certainly seconds (valid until 2286). A 13-digit number is milliseconds, 16 digits microseconds and 19 digits nanoseconds. This tool picks the unit from the digit count and shows which one it used; you can also choose the unit.

Why does local time differ from UTC?

UTC is the global reference point. Local time is UTC adjusted for your browser's timezone offset.

Is this tool accurate for all timezones?

Yes. The JavaScript Date API uses your system's timezone data for the local time display.