Epoch & Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and formats in UTC, ISO 8601, and your local timezone. Works with seconds, milliseconds, microseconds, and nanoseconds.
How It Works
Formula
Date = new Date(timestamp × 1000) | Epoch = Math.floor(Date.now() / 1000) Worked Example
Epoch timestamp 1700000000 converts to Tuesday, November 14, 2023 10:13:20 PM UTC (or 2023-11-14T22:13:20Z).
Understanding Unix Timestamps and the Epoch
The Unix epoch is the universal reference point used across operating systems, distributed databases, cloud APIs, and programming runtimes to measure time independently of geographical time zones and daylight saving time (DST) shifts.
Seconds vs. Milliseconds vs. Microseconds
When debugging API payloads or database records, identifying the unit of measurement is the most common hurdle:
| Unit | Number of Digits | Example | Common Runtime / Use Case |
|---|---|---|---|
| Seconds | 10 digits | 1742400000 | Linux CLI, Unix kernel, Redis, JWT expiry |
| Milliseconds | 13 digits | 1742400000000 | JavaScript, Java, MongoDB ISODate |
| Microseconds | 16 digits | 1742400000000000 | Python datetime, Cassandra, PostgreSQL |
| Nanoseconds | 19 digits | 1742400000000000000 | Go time.Now().UnixNano(), InfluxDB |
Common Conversion Snippets
- JavaScript / Node.js:
// Current epoch seconds const sec = Math.floor(Date.now() / 1000); // Epoch to Date const date = new Date(1742400000 * 1000); - Python 3:
import time from datetime import datetime, timezone # Epoch to UTC string utc_time = datetime.fromtimestamp(1742400000, tz=timezone.utc) - PostgreSQL:
SELECT TO_TIMESTAMP(1742400000);
Frequently Asked Questions
What is Unix Epoch time?
Unix epoch time (or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on Thursday, 1 January 1970, not counting leap seconds.
How do I know if my timestamp is in seconds or milliseconds?
Standard 10-digit integers (e.g. 1700000000) represent seconds. Standard 13-digit integers (e.g. 1700000000000) represent milliseconds (used by JavaScript `Date.now()`). 16-digit timestamps represent microseconds, and 19-digit timestamps represent nanoseconds.
What is the Year 2038 problem (Y2038)?
On January 19, 2038 at 03:14:07 UTC, 32-bit signed integers will overflow from 2,147,483,647 to -2,147,483,648, wrapping back to the year 1901. Modern 64-bit systems are immune and safe for billions of years.
How do I get the current epoch timestamp in programming languages?
In JavaScript: `Math.floor(Date.now() / 1000)`. In Python: `import time; int(time.time())`. In PHP: `time()`. In SQL: `UNIX_TIMESTAMP()`.
Related Tools
← View all other calculators toolsJson Formatter Calculator
Format (indent 2/4/tab), minify, validate; error with line/column; tree view collapse; sort keys option; copy/download.
Json To Excel Calculator
Paste/upload JSON array -> table preview -> download .xlsx/.csv. SheetJS (xlsx) lazy-loaded on click only; flatten nested keys with dot notation. All client-side.
Infix To Postfix Converter
Shunting-yard: infix -> postfix (and prefix optional) with step table (token, stack, output). Operators + - * / ^ and parentheses.
Swp Calculator
in: total investment, monthly withdrawal, expected return % p.a., years, optional yearly step-up % of withdrawal. out: total withdrawn, final balance, year-wise table + chart. Monthly loop: bal = bal*(1+r/12) - w. Flag when corpus runs out.
Love Calculator
Entertainment only. Deterministic result from two names (normalised hash -> 40-99%), same input always same output; result message tiers. Prominent 'for fun' note; no data stored.