๐ Epoch Time Converter, Unix Timestamp to Date and Back
By Shihab Mia ยท Updated 2026-07-31
Current epoch time (seconds)
0
0 ms
Detected as seconds.
UTC
—
Your local time
—
In milliseconds
—
Epoch seconds
—
Epoch milliseconds
—
| Epoch (seconds) | UTC date and time |
|---|---|
| 0 | 1970-01-01 00:00:00 (the Unix epoch) |
| 1,000,000,000 | 2001-09-09 01:46:40 |
| 1,600,000,000 | 2020-09-13 12:26:40 |
| 2,000,000,000 | 2033-05-18 03:33:20 |
| 2,147,483,647 | 2038-01-19 03:14:07 (32-bit signed int max, the "Year 2038 problem") |
The Year 2038 problem: many older systems store epoch time as a signed 32-bit integer, which can only count up to 2,147,483,647 seconds past 1970-01-01. At 03:14:08 UTC on 19 January 2038 that counter overflows and wraps around to a negative number, which those systems read as a date back in December 1901. Modern 64-bit systems are not affected, but plenty of embedded devices, old databases, and legacy file formats still use 32-bit time and will need fixing before that date.
An epoch time converter turns a Unix timestamp, the count of seconds since 1970-01-01 00:00:00 UTC, into a readable date and back again. This tool shows the live current epoch time updating every second, converts any epoch value in seconds or milliseconds into both UTC and your local time, and converts any date and time you pick straight back into epoch seconds. It automatically detects whether a pasted number is seconds or milliseconds by counting the digits, so you never have to guess which unit you are looking at.
What is the Epoch Time Converter?
Unix time, also called epoch time or POSIX time, is a system for describing a point in time as a single number: the number of seconds that have elapsed since the epoch, defined as 1970-01-01 00:00:00 UTC. Instead of storing a year, month, day, hour, minute, and second separately, a computer can store one integer, which makes it trivial to compare two moments, sort events chronologically, or calculate the gap between them with plain subtraction. This is why an epoch time converter is one of the most reached-for tools for developers, database administrators, and anyone debugging logs, APIs, or timestamps stored as raw numbers.
The formula behind an epoch timestamp is simple: epoch seconds = (target date in UTC) minus (1970-01-01 00:00:00 UTC), expressed in seconds. Going the other way, date = epoch + 1970-01-01 00:00:00 UTC. Most programming languages and databases store epoch time in seconds, but JavaScript's own Date object and many web APIs use epoch milliseconds instead, which is just the epoch seconds value multiplied by 1000. Because both units are common, a good unix timestamp converter needs to detect which one it is looking at. A convenient rule of thumb is digit count: current epoch seconds sit around 10 digits (roughly 1,700,000,000 in 2023, climbing toward 2,000,000,000 by 2033), while the equivalent millisecond value has 13 digits. This tool applies that exact rule, treating anything over 10 digits as milliseconds.
Epoch time is deliberately timezone-free. The raw number never changes based on where you are in the world; only the human-readable representation does. That is why this converter always shows two readings side by side, one formatted in UTC and one formatted in your browser's detected local timezone. When you convert a date going the other way, using the datetime-local picker, the browser treats what you typed as local time and this tool works out the matching epoch seconds. Understanding that separation, the stored number is universal, the displayed date is local, is the single most common source of confusion when working with unix timestamps.
Most systems today store epoch time as a 64-bit integer, which has effectively no practical ceiling. But plenty of older and embedded systems still use a signed 32-bit integer, which can only hold values up to 2,147,483,647. That number corresponds to 2038-01-19 03:14:07 UTC, after which a 32-bit counter overflows and wraps to a negative number, misreading the date as sometime in December 1901. This is known as the Year 2038 problem, and it is the timestamp equivalent of the Y2K bug. The reference table below includes that exact boundary value alongside a few other well-known epoch milestones, so you can see how the numbers map to real dates.
When to use it
- Debugging an API response or log file that stores createdAt or updatedAt as a raw epoch number instead of a readable date.
- Converting a Unix timestamp found in a database row, CSV export, or JSON payload into a date you can actually read.
- Scheduling a task, cache expiry, or JWT token to expire at an exact epoch second by converting a target date and time forward.
- Checking what the current epoch time is right now, for testing a script, an API call, or a webhook payload.
How to use the Epoch Time Converter
- Look at the top of the tool for the live current epoch time in seconds, which updates every second, or press Use current time to drop it straight into the input field.
- Paste or type a Unix timestamp into the epoch input. The tool automatically detects seconds versus milliseconds based on digit count and shows the equivalent UTC date, your local date, and the millisecond value.
- To go the other direction, use the date and time picker on the right. Choose any date and time in your local timezone and the tool instantly shows the matching epoch seconds and milliseconds.
- Use the Copy result button under either panel to copy the converted value to your clipboard for pasting into code, a spreadsheet, or a bug report.
Formula & method
Worked examples
You find the value 1700000000 in a database column called created_at. What date is that?
- Count the digits: 1700000000 has 10 digits, so it is treated as epoch seconds, not milliseconds.
- Multiply by 1000 to get milliseconds for display purposes: 1,700,000,000 x 1000 = 1,700,000,000,000 ms.
- Convert that instant to UTC: 1970-01-01 00:00:00 UTC plus 1,700,000,000 seconds lands on 2023-11-14 22:13:20 UTC.
Result: Epoch 1700000000 corresponds to 2023-11-14 22:13:20 UTC (and the equivalent local time in your timezone).
A JavaScript log shows the value 1700000000000. Is that the same moment as the example above?
- Count the digits: 1700000000000 has 13 digits, so it is auto-detected as epoch milliseconds.
- Divide by 1000 to get epoch seconds: 1,700,000,000,000 / 1000 = 1,700,000,000 seconds.
- That is the identical epoch second value as the first example, so it resolves to the same date.
Result: Yes. 1700000000000 ms and 1700000000 sec both point to 2023-11-14 22:13:20 UTC, which is exactly why digit count reliably tells the two units apart.
Well-known epoch milestones
| Epoch seconds | UTC date and time | Note |
|---|---|---|
| 0 | 1970-01-01 00:00:00 | The Unix epoch itself, time zero |
| 1,000,000,000 | 2001-09-09 01:46:40 | The moment epoch time passed one billion seconds |
| 1,600,000,000 | 2020-09-13 12:26:40 | A commonly cited round test value |
| 2,000,000,000 | 2033-05-18 03:33:20 | Epoch time will reach two billion seconds on this date |
| 2,147,483,647 | 2038-01-19 03:14:07 | Maximum value of a signed 32-bit integer, the Year 2038 problem |
Seconds vs milliseconds, how to tell them apart
| Digit count | Typical unit | Example value |
|---|---|---|
| 10 digits | Seconds | 1735689600 |
| 13 digits | Milliseconds | 1735689600000 |
| 16 digits | Microseconds (used by some systems) | 1735689600000000 |
Common mistakes to avoid
- Mixing up seconds and milliseconds. Passing a seconds value where milliseconds are expected (or vice versa) produces a date off by a factor of 1000, which usually lands somewhere in 1970 or thousands of years in the future. Always check the digit count: 10 digits is normally seconds, 13 digits is normally milliseconds.
- Assuming epoch time carries a timezone. A raw epoch number has no timezone attached; it is always a count of seconds from UTC. The confusion happens when a date is displayed without saying which timezone it was formatted in. This tool always labels the UTC reading and the local reading separately to avoid that ambiguity.
- Forgetting the Year 2038 limit on older systems. A signed 32-bit epoch counter overflows after 2,147,483,647 seconds, on 2038-01-19. Software built on old C libraries, embedded firmware, or legacy databases that never migrated to 64-bit time storage can misread dates after that point. Check whether a system uses 32-bit or 64-bit time before relying on far-future timestamps.
- Treating a datetime-local input as UTC. The HTML date and time picker used in this tool (and in most web forms) represents what you typed in your own local timezone, not UTC. If you need a specific UTC moment, convert your local time to UTC first, or check the UTC reading shown alongside the epoch input to confirm you have the right value.
Glossary
- Unix time
- The number of seconds elapsed since 1970-01-01 00:00:00 UTC, also called epoch time or POSIX time.
- Epoch
- The fixed reference point a time system counts from; for Unix time that reference point is 1970-01-01 00:00:00 UTC.
- UTC
- Coordinated Universal Time, the timezone-independent standard that epoch time is always measured against.
- Epoch milliseconds
- An epoch value expressed in thousandths of a second instead of whole seconds; equal to epoch seconds multiplied by 1000, and the unit JavaScript Date objects use internally.
- Year 2038 problem
- The overflow that occurs when a signed 32-bit epoch counter exceeds 2,147,483,647 seconds on 2038-01-19, wrapping around to a negative, incorrect date.
- ISO 8601
- A standard text format for dates and times, such as 2026-07-31T14:00:00Z, often used alongside epoch time as a human-readable equivalent.
Frequently asked questions
What is epoch time?
Epoch time, also called Unix time, is the number of seconds that have passed since 1970-01-01 00:00:00 UTC. It is a single integer that computers use to represent any moment in time.
How do I convert a Unix timestamp to a date?
Add the timestamp, in seconds, to 1970-01-01 00:00:00 UTC. Paste the number into this tool and it shows the exact UTC date and your local date instantly, with no manual math required.
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. Current epoch seconds have 10 digits, while the equivalent milliseconds value has 13 digits. This tool applies that same rule automatically and labels which unit it detected.
What is the current epoch time right now?
This tool displays the live current epoch time at the top of the page, updating every second in both seconds and milliseconds, so you can read it directly or copy it with the Use current time button.
What is the Year 2038 problem?
It is an overflow bug in systems that store epoch time as a signed 32-bit integer, which runs out of room at 2,147,483,647 seconds, on 2038-01-19 03:14:07 UTC, and then wraps around to an incorrect date in 1901.
Can epoch time be negative?
Yes. Negative epoch values represent dates before 1970-01-01 UTC; for example, -1 is 1969-12-31 23:59:59 UTC. Most systems support negative epoch time, though some older tools reject it.