Free tool Unix timestamp converter: epoch time to date and back
Paste a timestamp from a log, an API response or a database row and see the date it stands for in any time zone. Or type a date and get the Unix time in seconds and milliseconds. The converter reads the unit from the number of digits, so 10-digit and 13-digit values both just work.
- Seconds to nanoseconds
- Any time zone, DST-aware
- Runs locally
Convert a timestamp or a date
One value per line. A number is read as Unix time; a date is read in the time zone you pick unless it carries its own offset. Paste several lines to convert them all at once.
Numbers: 10 digits = seconds, 13 = milliseconds. Dates: YYYY-MM-DD HH:mm:ss; add Z or +08:00 to fix the offset.
Used to display the result and to read dates that have no offset. Starts on your browser’s zone when it is in the list.
Leave on auto unless a value is short, such as a timestamp from the early 1970s.
2023-11-14 22:13:20 (UTC+00:00)With the UTC offset in force at that moment, so daylight saving is visible.
2023-11-14T22:13:20.000ZThe unambiguous form for storing and exchanging times. Always UTC, ends in Z.
1700000000What PHP time(), Python int(time.time()) and MySQL UNIX_TIMESTAMP() return.
1700000000000What JavaScript Date.now() and Java System.currentTimeMillis() return.
Each input line → date in the selected zone (Unix seconds). A line that cannot be read shows ?.
Share these inputs: the values go after the # in the link, so they never reach a server.
https://tapcub.com/tools/timestamp-converter
Version v1.0Updated Update history
Four ways to write the same moment
Every output describes one instant. They differ only in unit and in whether a time zone is applied for display.
Seconds and milliseconds
The same count of time since 1970-01-01 00:00:00 UTC, one with three more digits. Back-end languages and databases tend to use seconds; JavaScript and Java use milliseconds. Sending one where the other is expected is the most common timestamp bug.
ISO 8601 (UTC)
A readable string that carries its zone: the trailing Z means UTC. Logs, APIs and JSON payloads should use this form, because anyone can parse it without guessing the zone.
Date in the selected zone
The wall-clock time someone in that zone would have seen. The offset in brackets is the one in force on that date, so a New York date in July shows UTC−04:00 and one in January shows UTC−05:00.
All lines
Appears when you paste more than one line. Each row keeps the original value, so you can paste a column from a log or a spreadsheet and copy the converted column back.
A Unix timestamp has no time zone. Changing the zone changes how the moment is displayed, never the seconds or milliseconds.
Convert in three steps
The converter updates as you type; there is no button to press.
-
1
Paste a value
A timestamp of any common length, a date such as
2026-11-10 09:30, or a whole column with one value per line. “Use current time” fills in the current Unix second. -
2
Pick the time zone
Choose the zone you want to read the result in. For dates without an offset, this is also the zone the date is assumed to be in.
-
3
Check the unit, then copy
If a result lands in 1970 or in a year far in the future, the unit is wrong: set it by hand. Each output has a copy button.
Unix time counts seconds from 1970-01-01 00:00:00 UTC
The starting point is called the Unix epoch. A timestamp is the number of seconds (or ms, µs, ns) since then, negative for earlier dates. Converting to a date is adding that many seconds to the epoch, then applying a time zone for display.
- Auto unit: up to 11 digits = seconds, 12–14 = milliseconds, 15–17 = microseconds, 18–20 = nanoseconds
- Dates accept
-,/or.between parts, optional seconds and milliseconds, and an optionalZor±HH:MMoffset - Unix time ignores leap seconds, so every day is exactly 86,400 seconds long in the count
- Time zones and daylight saving come from the IANA database built into your browser
Timestamp → UTC date
date = 1970-01-01T00:00:00Z + seconds
1700000000 → 2023-11-14T22:13:20Z
Seconds ↔ milliseconds
ms = seconds × 1,000
1700000000 s = 1700000000000 ms
UTC → local time
local = UTC + zone offset on that date
22:13:20 UTC − 5 h → 17:13:20 in New York
Largest 32-bit timestamp
2³¹ − 1 = 2147483647
→ 2038-01-19T03:14:07Z, the “year 2038” limit
Five inputs, read in New York time
All five lines pasted at once with the time zone set to America/New_York. The first three are the same instant at different precisions; the last two show how an offset in the input changes the result.
| Input | Read as | ISO 8601 (UTC) | Shown in America/New_York |
|---|---|---|---|
1700000000 | Seconds (10 digits) | 2023-11-14T22:13:20.000Z | 2023-11-14 17:13:20 (UTC−05:00) |
1700000000000 | Milliseconds (13 digits) | 2023-11-14T22:13:20.000Z | 2023-11-14 17:13:20 (UTC−05:00) |
1700000000123456 | Microseconds (16 digits) | 2023-11-14T22:13:20.123Z | 2023-11-14 17:13:20 (UTC−05:00) |
2026-11-10 09:30 | Date in the selected zone | 2026-11-10T14:30:00.000Z | 2026-11-10 09:30:00 (UTC−05:00) |
2026-11-10T09:30:00+08:00 | Date with its own offset | 2026-11-10T01:30:00.000Z | 2026-11-09 20:30:00 (UTC−05:00) |
The last row is 09:30 in Beijing, which is still the previous evening in New York. Without the +08:00 it would have been read as 09:30 New York time, 13 hours later.
Where timestamps go wrong
The conversion is exact. The bugs come from units and time zones that were assumed rather than stated.
Seconds and milliseconds swapped
Milliseconds read as seconds land tens of thousands of years in the future; seconds read as milliseconds land in January 1970. Check the digit count at every API boundary.
Dates stored without a zone
“2026-11-10 09:30” means a different instant in every city. Store Unix time or ISO 8601 with Z or an offset, and convert to local time only for display.
Trusting the server’s clock zone
A server set to UTC and a laptop set to local time format the same timestamp differently. Pass the zone explicitly instead of relying on system defaults.
Adding 86,400 for “tomorrow”
On a daylight-saving change day a local day has 23 or 25 hours. Add calendar days in the target zone, not a fixed number of seconds.
Timestamps you do not have to convert by hand
Every event TapCub collects carries the time it happened. Reports turn it into days and hours in your site’s time zone, so the numbers line up with your business day.
Server API events
Payments, refunds and other backend jobs send named events with a Server Key, into the same project as the website.
Learn moreRealtime visitors
See who is on the site right now: page, source, country and time on page.
Learn moreCustom events and properties
Track the actions that matter, with the properties you need to break them down.
Learn moreTimestamp questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
What is a Unix timestamp?
The number of seconds since 1970-01-01 00:00:00 UTC, the Unix epoch. 1700000000 is 2023-11-14 22:13:20 UTC. Because it is just a number, it is easy to store, sort and compare, and it means the same instant everywhere.
How do I tell seconds from milliseconds?
Count the digits. Current dates are 10 digits in seconds and 13 in milliseconds; 16 digits is microseconds and 19 is nanoseconds. The converter does this automatically, and you can override it with the unit menu.
How do I get the current timestamp in code?
JavaScript: Math.floor(Date.now() / 1000) (or Date.now() for ms). Python: int(time.time()). PHP: time(). Java: Instant.now().getEpochSecond(). MySQL: UNIX_TIMESTAMP(). Shell: date +%s.
Does a Unix timestamp have a time zone?
No. It counts from a fixed instant defined in UTC, so the same timestamp is the same moment in London and in Tokyo. A time zone only comes in when you format it as a calendar date and clock time.
Why is my converted time off by a few hours?
Almost always a time zone assumption: the date was written in one zone and read in another, or a server formatted it in UTC. Add an offset such as +08:00 to the input, or set the zone menu to the one the value was written in.
What is the year 2038 problem?
Systems that store Unix seconds in a signed 32-bit integer overflow after 2147483647, which is 2038-01-19 03:14:07 UTC. Use 64-bit integers or a proper date type for anything that may reach that far.
Does the converter handle daylight saving time?
Yes. Offsets come from the IANA time zone database in your browser, so each date gets the offset in force on that day. The result shows the offset next to the time.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Let the events carry their own time
Install TapCub once and every pageview and event is stored with its timestamp, ready to report by hour, day or week in your site’s time zone.