HomeTime & Geography › Unix Timestamp Converter

Unix Timestamp Converter

Converts a Unix timestamp (seconds or milliseconds since 1970-01-01T00:00:00Z, auto-detected) to a UTC and local date-time, or an ISO 8601 date-time (with optional time, offset or IANA zone) to epoch seconds and milliseconds, plus weekday, day of year and ISO week.

When to use

You need to decode an epoch value from logs or an API, or produce the epoch seconds for a given calendar date and time.

Do not use when: You need Julian Day numbers (use julian-date) or wall-clock conversion between two cities (use time-zone-converter).

Formula

unix_seconds = floor((instant − 1970-01-01T00:00:00Z) / 1 s); |timestamp| > 1e11 → milliseconds, else seconds; datetime without offset: instant = wall time − offset(time_zone)

Unix time counts SI seconds ignoring leap seconds (POSIX definition), so every day has exactly 86,400 s. Supported instants: years 1 to 9999.

Inputs

ParameterTypeUnitRequiredDescription
timestampnumbernoSeconds since the Unix epoch; values with |timestamp| > 1e11 are read as milliseconds. Takes precedence over datetime when both are given. Range: ≥ -1000000000000000, ≤ 1000000000000000
datetimestringnoISO 8601 date-time to convert instead of a timestamp: YYYY-MM-DD[THH:MM[:SS]] with optional Z or ±HH:MM offset; without an offset it is read in time_zone.
time_zonestringdefault UTCIANA zone used to interpret a datetime without offset and to report the local date-time.

Outputs

OutputTypeUnitDescription
unix_secondsintegersWhole seconds since 1970-01-01T00:00:00Z (floored).
unix_millisecondsintegermsMilliseconds since the Unix epoch.
iso_utcstringInstant in UTC, e.g. 2023-11-14T22:13:20Z (milliseconds shown only when non-zero).
utc_stringstringRFC 7231 / RFC 1123 form, e.g. Tue, 14 Nov 2023 22:13:20 GMT.
local_datetimestringInstant in time_zone with its UTC offset (ISO 8601).
utc_offsetstringOffset of time_zone at that instant (±HH:MM).
day_of_weekstringDay of the week of the UTC date.
day_of_yearintegerOrdinal day of the UTC date, 1 January = 1.
iso_week_datestringUTC date in ISO 8601 week notation YYYY-Www-D.
interpretationstringHow the input was read (seconds, milliseconds, explicit offset or zone).

Example

Timestamp 1700000000: {"timestamp":1700000000}{"unix_seconds":1700000000,"unix_milliseconds":1700000000000,"iso_utc":"2023-11-14T22:13:20Z","utc_string":"Tue, 14 Nov 2023 22:13:20 GMT","local_datetime":"2023-11-14T22:13:20+00:00","day_of_week":"Tuesday","day_of_year":318,"iso_week_date":"2023-W46-2"}

2026-09-23 09:00 in Australia/Adelaide: {"datetime":"2026-09-23T09:00","time_zone":"Australia/Adelaide"}{"unix_seconds":1790119800,"iso_utc":"2026-09-22T23:30:00Z","local_datetime":"2026-09-23T09:00:00+09:30","utc_offset":"+09:30","day_of_week":"Tuesday","day_of_year":265}

GET https://tttkmbb.com/api/v1/calculate/unix-timestamp?timestamp=1700000000

Machine access

Sources

FAQ

How do you tell seconds from milliseconds?

Any absolute value above 1e11 is treated as milliseconds (1e11 s would be the year 5138), so 1700000000 is seconds and 1700000000000 is milliseconds.

Are leap seconds counted?

No. Unix time is defined without leap seconds; the 27 leap seconds inserted since 1972 are absorbed by repeating a second, so conversions here match POSIX and every standard library.

Related calculators