Epoch / Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and back — with timezone support.

epoch-converter
Unix (seconds)
1783345098
Milliseconds
1783345098615
// timestamp → date
// date → timestamp

About Epoch / Unix Timestamp Converter

Unix time (also called epoch time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It's the universal timestamp format used in databases, APIs, log files, JWT tokens, and virtually every backend system. This converter makes working with epoch timestamps effortless. Paste any Unix timestamp — in seconds or milliseconds — and instantly see the corresponding date in ISO 8601, UTC, and your local timezone. Or enter a date and time to get the equivalent Unix timestamp. The converter handles both directions with no configuration needed. The current timestamp updates every second in the header, so you can always grab the live epoch value. This is useful when testing time-based logic, debugging JWT expiration, checking if a database timestamp is in the past or future, or converting log file timestamps to readable dates. Millisecond precision is supported — the tool auto-detects whether your input is in seconds or milliseconds based on the magnitude of the number (values over 10^10 are treated as milliseconds).

How it works

JavaScript's Date object is built on a single number: milliseconds since the Unix epoch. When you paste a timestamp, the tool first decides on the unit — any value above 10,000,000,000 (10^10) is assumed to be milliseconds, since a seconds-based current time is only ten digits — and multiplies by 1000 if needed. It then constructs new Date(milliseconds), which represents one exact instant in time with no timezone attached. From that single instant the three views are just different formatters over the same value: toISOString() renders the canonical UTC ISO-8601 string, a UTC breakdown is read with the getUTC* methods, and toLocaleString() renders it in whatever timezone your browser is set to — which is why the same timestamp can legitimately show different wall-clock times. Converting the other direction, a date you enter is parsed back into that millisecond number with getTime() and divided by 1000 for the seconds form. The live clock in the header is just Date.now() sampled once a second.

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp is the number of seconds (or milliseconds) since January 1, 1970, 00:00:00 UTC — called the Unix epoch. It's timezone-agnostic, which makes it ideal for storing and comparing times across systems in different regions.
How do I know if a timestamp is in seconds or milliseconds?
Seconds-based timestamps for current time are 10 digits (e.g., 1700000000). Milliseconds-based timestamps are 13 digits (e.g., 1700000000000). This converter auto-detects based on magnitude — any value over 10,000,000,000 (10^10) is treated as milliseconds.
How do I get the current Unix timestamp in JavaScript?
Use Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds. new Date().getTime() also returns milliseconds. On the server (Node.js), you can also use process.hrtime.bigint() for nanosecond precision.
What is the year 2038 problem?
Systems that store Unix timestamps as 32-bit signed integers will overflow on January 19, 2038 at 03:14:07 UTC — that's when the max 32-bit value (2,147,483,647) is reached. Modern systems use 64-bit timestamps, which won't overflow for ~292 billion years.
Why does the same timestamp show different dates in different tools?
The Unix timestamp itself is timezone-agnostic (always UTC). Different tools display it in different local timezones by default. This converter shows UTC, ISO 8601, and your browser's local timezone side by side so you can compare.