Timestamp Converter

Convert Unix timestamps (epoch) to human-readable dates and vice versa. Live clock, ISO 8601, and relative time.

Current Unix Timestamp

1,774,884,565

Monday, March 30, 2026 at 03:29:25 PM UTC

What is a Unix timestamp?

A Unix timestamp (epoch time) counts the seconds elapsed since January 1, 1970 00:00:00 UTC. Storing time as a single integer removes timezone ambiguity, sorts naturally, and uses minimal storage. Databases, APIs, log files, and JWT tokens all use Unix timestamps heavily.

Working with timestamps in code

// JavaScript — milliseconds (÷ 1000 for seconds)
Date.now()                        // current ms timestamp
new Date(1700000000 * 1000)       // seconds → Date object
Math.floor(Date.now() / 1000)     // current seconds timestamp

// Python
import time, datetime
time.time()                       # current seconds (float)
datetime.datetime.fromtimestamp(1700000000)  # → datetime

// PostgreSQL
SELECT NOW();                     -- current timestamp
SELECT EXTRACT(EPOCH FROM NOW()); -- → seconds since epoch
SELECT to_timestamp(1700000000);  -- seconds → timestamptz

// MySQL
SELECT UNIX_TIMESTAMP();          -- current seconds
SELECT FROM_UNIXTIME(1700000000); -- seconds → datetime

Common timestamp pitfalls

  • Seconds vs. milliseconds — 10-digit timestamps are seconds; 13-digit are milliseconds. JavaScript uses milliseconds (Date.now()), most APIs and databases use seconds.
  • Year 2038 problem — 32-bit signed integers overflow at timestamp 2147483647 (Jan 19, 2038). Modern systems use 64-bit integers, but old embedded systems and databases may still be affected.
  • Leap seconds — Unix time ignores leap seconds, so it is not perfectly synchronized with UTC. Typically irrelevant for application development.

Related Tools

Frequently Asked Questions

What is a Unix timestamp?

A Unix timestamp (or epoch time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC. It's widely used in programming, databases, and APIs to represent dates and times as a single number.

What is the difference between seconds and milliseconds timestamps?

Unix timestamps in seconds have 10 digits (e.g., 1700000000), while millisecond timestamps have 13 digits (e.g., 1700000000000). JavaScript's Date.now() returns milliseconds, while most APIs use seconds.

Can I convert a date to a Unix timestamp?

Yes. Use the date picker on the right side to select a date and time, then click Convert to get the corresponding Unix timestamp in your selected unit (seconds or milliseconds).

Does this tool support timezones?

The tool displays dates in your browser's local timezone. The ISO 8601 output always includes the UTC offset for unambiguous timezone representation.