---
title: "Unix Timestamp Converter"
description: "Convert between Unix timestamp and ISO 8601. Seconds and milliseconds are detected automatically."
url: https://sade.dev/en/tools/timestamp/
lang: en
author: "Muhammet Şafak"
published: 2026-04-04
updated: 2026-08-30
section: Tool
tags: ["time","timestamp","unix"]
---

# Unix Timestamp Converter

> Convert between Unix timestamp and ISO 8601. Seconds and milliseconds are detected automatically.

A Unix timestamp approximates the number of seconds elapsed since 1 January 1970 UTC —
every day counts as exactly 86,400 seconds, so leap seconds are not included. This
tool detects both **seconds** and **milliseconds** input automatically (large
numbers are interpreted as ms).

## Seconds or milliseconds?

- **PHP** `time()` — seconds.
- **Python** `time.time()` — seconds (with a fractional part).
- **JavaScript** `Date.now()` — **milliseconds**. (This difference is the most common
  source of bugs when you try to make JavaScript talk to other languages.)
- **PostgreSQL** `extract(epoch from now())` — seconds (with a fractional part).
- **Redis** `TIME` command — seconds + microseconds.

When you design an API, **write the unit decision into the documentation**. Otherwise
clients forget to multiply/divide by 1000 and you end up with "your dates are in 1970"
bugs.

## UTC vs local

A Unix timestamp is always UTC. When local time is shown, your browser's time zone
has been applied.

In production, **keep server logs in UTC**. Converting on the client side is always
cleaner than drifting into time zone confusion on the server.

## ISO 8601

The `2026-05-18T14:30:00.000Z` format is a specific variant of ISO 8601 — the trailing
`Z` means "Zulu time", i.e. UTC. This format:

- Sorts correctly in date order (as a string).
- Is accepted by all modern APIs and databases.
- Carries no ambiguity (the time zone is always specified).

Always send date fields in your APIs as ISO 8601.

## The year 2038 problem

A Unix timestamp stored as a 32-bit signed integer overflows on 19 January 2038. Newer
systems use 64-bit and never hit this problem. For old C code or embedded systems, it's
still a risk.

## Privacy

All conversions run entirely in your browser.
