Skip to main content
DEVELOPER

Unix to ISO 8601

Convert a Unix timestamp to an ISO 8601 string, once in UTC and once with your local UTC offset.

Unix timestamp to ISO 8601

APIs, JSON documents and databases usually expect dates as ISO 8601 strings. This page turns a Unix timestamp into that format, once in UTC ending in Z and once with your local UTC offset, so you can copy whichever your code or API needs.

UTC or local offset?

Use the UTC form, which ends in Z, for storage, logs and API payloads: it is unambiguous and sorts alphabetically in time order. Use the offset form when a person needs to read local time while the exact instant stays recoverable, for example 2026-09-21T15:13:20.000+01:00.

Want the background? Read our comprehensive guide: ISO 8601 Date and Time Format.

How to use this tool

  1. Enter the Unix timestamp.
  2. Leave Unit on Auto, or choose Seconds or Milliseconds.
  3. Select Convert to ISO 8601.
  4. Copy the UTC or local-offset string.

Examples

One instant written three ways.

UTC

1790000000123 (milliseconds)

ISO 8601
2026-09-21T14:13:20.123Z

Tokyo (UTC+09:00)

1790000000123 (milliseconds)

ISO 8601
2026-09-21T23:13:20.123+09:00

New York (daylight saving time)

1790000000123 (milliseconds)

ISO 8601
2026-09-21T10:13:20.123-04:00

Same instant, different offset.

Frequently Asked Questions

How do I create an ISO 8601 string in JavaScript?
new Date(timestampInMilliseconds).toISOString() returns a UTC string such as 2026-09-21T14:13:20.000Z.
How do I create one in Python?
datetime.fromtimestamp(ts, tz=timezone.utc).isoformat() returns a string such as 2026-09-21T14:13:20+00:00.
Why does the ISO string end in Z?
Z stands for Zulu time, another name for UTC. It means the offset from UTC is zero.
Are milliseconds always included?
Yes, the output always has three decimal places, like JavaScript's toISOString(). Most parsers accept this. Remove the .000 if your API does not want a fraction.