This tool runs entirely in your browser. Nothing you paste is uploaded.
How you can check →Epoch Converter
Time & DateConvert Unix/epoch timestamps to human-readable dates, and dates back to timestamps — instantly, entirely in your browser.
Current Unix time (seconds)
—
Paste anything that might be a moment in time
A Unix timestamp in seconds, milliseconds, microseconds or nanoseconds; an ISO 8601 date; an
HTTP date; or a SQL DATETIME. We'll say what we think it is and why — and
never quietly pick for you if there's a real alternative.
More formats & calendar facts
Time zone for this page
Drives both the "Chosen zone" output above and how Date → Timestamp below is interpreted.
Currently:
Date → Timestamp
Interpreted in the zone above (local).
Paste a column of timestamps, or log lines
One entry per line, mixed units and formats are fine — each line gets its own reading, in the zone chosen in Convert. A line that can't be read is reported in place, never dropped.
Paste one timestamp or date per line above to see a reading for each.
| Line | Input | Reading | UTC | Chosen zone |
|---|
Everything below operates on the instant resolved in Convert (currently —), in the zone chosen there.
Add or subtract a duration
Years, months and days step the calendar date and re-resolve against the chosen zone, so a day spanning a DST change is 23 or 25 real hours — not a blind +86,400,000ms. Hours, minutes and seconds are always real elapsed time.
Difference between two moments
Start / end of period
Returned as an epoch pair — start ≤ ts < end — the shape a
WHERE clause actually wants.
Foreign epochs
The instant resolved in Convert (currently —), expressed the way other systems count time. Formulas and base dates are on the Reference tab.
Code, both directions
Real, runnable code — not a simulated result. Every snippet below uses the same
example instant, 1700000000 / 2023-11-14T22:13:20Z, so you can compare two
languages line for line; substitute your own value.
Sentinels & sanity flags
Values that are, in practice, almost never a genuine moment in time — they're a system's stand-in for "unset", "error", "overflowed" or "never expires". The Convert tab flags these automatically.
| Value (seconds) | Usually means |
|---|---|
| 0 | Unset / not provided, in systems that default a missing timestamp to 0 |
| -1 | "Error" or "not set", used instead of null by some APIs |
| 2147483647 | 32-bit signed overflow — 2038-01-19T03:14:07Z, the Year 2038 problem |
| 4294967295 | 32-bit unsigned overflow — 2106-02-07T06:28:15Z |
| 253402300799 | 9999-12-31T23:59:59Z, a common "never expires" sentinel |
| 946684800 | 2000-01-01T00:00:00Z, the Y2K rollover instant |
| near −2,147,483,648 | Likely a positive value that overflowed a signed 32-bit field and wrapped negative |
Foreign epoch formulas
| Format | Base date | Unit |
|---|---|---|
| Windows FILETIME / LDAP | 1601-01-01T00:00:00Z | 100-nanosecond intervals |
.NET DateTime.Ticks | 0001-01-01T00:00:00Z | 100-nanosecond intervals |
| Chrome / WebKit time | 1601-01-01T00:00:00Z | microseconds |
| Excel / OLE Automation date | 1899-12-30T00:00:00 | days |
| Cocoa / Core Data | 2001-01-01T00:00:00Z | seconds |
| Mac HFS+ (classic) | 1904-01-01T00:00:00Z | seconds |
| NTP timestamp | 1900-01-01T00:00:00Z | seconds |
| GPS time | 1980-01-06T00:00:00Z | seconds, no leap seconds (currently 18s behind UTC) |
| Julian Day | −4712-01-01T12:00:00Z | days |
| Discord snowflake ID | 2015-01-01T00:00:00Z | ms, top 42 bits after a 22-bit shift |
| Twitter snowflake ID | 2010-11-04T01:42:54.657Z | ms, top 42 bits after a 22-bit shift |
| MongoDB ObjectId | 1970-01-01T00:00:00Z | seconds, first 4 bytes |
| ULID | 1970-01-01T00:00:00Z | ms, first 48 bits |
| UUID v7 | 1970-01-01T00:00:00Z | ms, first 48 bits |
| UUID v1 | 1582-10-15T00:00:00Z | 100-nanosecond intervals, 60 bits |
Notable timestamps
Click one to load it into Convert.
Seconds in…
| A minute | 60 |
| An hour | 3,600 |
| A day | 86,400 |
| A week | 604,800 |
| A 365-day year | 31,536,000 |
| A 366-day (leap) year | 31,622,400 |
No network activity while you use this tool Show the numbers
- Requests to any other server
- 0
- Requests since you started typing
- —
- Same-origin requests
- 0
Counted live by your browser's own Performance Timeline — the same data the DevTools Network panel reads. It cannot see what a browser extension does, and it is not meant to replace checking for yourself: here is how, in thirty seconds .
What is Unix time?
Unix time (also called epoch time or POSIX time) counts the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970, ignoring leap seconds. It's the standard way most operating systems, programming languages, databases, and APIs represent a point in time internally — as a single number rather than a formatted string.
Why use a timestamp instead of a date string?
A timestamp is timezone-independent, sorts numerically, and is trivial to do arithmetic on (e.g. "is this token expired?" or "how many days between these two events?"). Formatted date strings only enter the picture when you need to display a timestamp to a human — and that's exactly what this tool converts between.
Local time isn't always one answer
Twice a year, clocks in most zones that observe daylight saving time either skip an hour or repeat one. A local time inside the skipped hour never happened, and a local time inside the repeated hour happened twice — at two different instants, an hour apart. Rather than silently guess which one you mean (or invent an instant that never occurred), this tool tells you which case you're in and, for a repeated hour, shows both instants with their own UTC offsets.
Common use cases
- Debugging API responses or database rows that store
created_atas an epoch integer - Checking a JWT's
exp/iatclaims (see the JWT decoder) - Converting log timestamps to your local timezone — and, once decoded, checking what that moment was for a colleague elsewhere with the world clock and time zone converter
- Scheduling or cache-expiry calculations
- Pasting a column of timestamps from a log file or spreadsheet to convert them all at once, with a CSV you can drop straight back into a spreadsheet
- Turning a decoded timestamp into a string your code can print — the date format generator gives you the exact format string for Python, Java, C#, Go, PHP or SQL
- Deciding whether a value is really a moment in time, or a "0"/"-1"/"never expires" sentinel in disguise
- Working out what a Snowflake ID, MongoDB ObjectId, ULID or UUID v7/v1 was generated at
- Making sense of an Excel serial date, a Windows FILETIME, or a .NET
Ticksvalue - Computing a date range for a query — start/end of day, week, month, quarter or year, DST-aware
Why 10 digits, or 13, or 19?
A 10-digit value is almost always seconds since the epoch (Unix/Linux, most
APIs, most databases). 13 digits is almost always milliseconds (JavaScript's
Date.now(), many web APIs). 16 is microseconds, and 19 is
nanoseconds (Go's UnixNano(), ClickHouse, InfluxDB,
OpenTelemetry). Digit count is a strong prior, not a guarantee — a pre-1970 or far-future
value breaks the pattern, and this tool checks the implied year rather than trusting width
alone, showing every unit as a one-click alternate so you can correct it in one click if the
guess is wrong. Under the hood, every unit conversion runs on BigInt rather than
JavaScript's Number, which starts losing precision above 253 — so a
19-digit nanosecond value comes back exact instead of silently rounded to the nearest few
hundred nanoseconds, which is what a naive Number()-based converter does.
The Year 2038 problem
Systems that store a Unix timestamp in a signed 32-bit integer (the C
time_t on many older or embedded systems) run out of room at
2147483647, which is 2038-01-19T03:14:07 UTC. One second
later the value overflows and wraps to a large negative number — 1901, not 2038, on an
unpatched system. Nearly everything built in the last decade uses a 64-bit
time_t and is unaffected, but 32-bit embedded devices, old databases and some
file formats still aren't. This tool flags 2147483647 and values near
−2147483648 automatically, since a value in that second range usually means
"this already overflowed."
IDs that secretly carry a timestamp
Several widely-used ID formats encode the moment they were generated directly in the ID, no separate column required. A Snowflake ID (Discord, Twitter/X and several other platforms) packs milliseconds-since-a-platform-epoch into its top bits. A MongoDB ObjectId's first 4 bytes are epoch seconds. A ULID and a UUID v7 both encode 48-bit milliseconds in their first 10/12 characters — that's the whole point of the newer UUID versions, sortable-by-creation-time IDs. An older UUID v1 carries a 60-bit count of 100-nanosecond intervals since 1582. Paste any of these into the converter above and it decodes automatically.
Time math: adding, subtracting and date ranges
The Time math tab turns a resolved instant into answers you can act on:
add or subtract a duration (years, months, days, hours, minutes, seconds), find the signed
difference between two timestamps as both seconds and a human breakdown, and get the
start/end epoch of a day, week, month, quarter or year — the pair a
WHERE created_at BETWEEN start AND end query actually needs. Calendar units
(years, months, days) step the wall-clock date and re-resolve in your chosen time zone, so
adding "one day" across a daylight-saving change correctly comes out to 23 or 25 real hours,
not a naive +86,400,000 milliseconds.
Code snippets, both directions, in real languages
The Formats & code tab prints runnable code — not a simulated result — for parsing a Unix timestamp, formatting one, and getting the current time in Python, JavaScript, Java, C#, Go, PHP, Ruby, Rust, SQL (PostgreSQL, MySQL, SQL Server, SQLite), shell, PowerShell and Excel. Every language's snippet is anchored to the same example instant, so you can copy the one you need or compare two languages line for line.
Foreign epochs
Not every system counts from 1970. Windows' FILETIME (and LDAP timestamps)
count 100ns intervals from 1601. .NET's DateTime.Ticks does the same from year 1.
Excel stores dates as a day count from 1899-12-30 — the number behind that
"45678" a CSV import sometimes shows instead of a date. Apple's Cocoa/Core Data, classic Mac
HFS+, NTP, GPS time and the astronomical Julian Day all use their own base date and unit too.
The Formats & code tab converts the resolved instant into every one of
these, and the Reference tab lists the base date and unit for each.
Frequently asked questions
- What is a Unix/epoch timestamp?
- It's the number of seconds (or milliseconds) that have elapsed since 00:00:00 UTC on January 1, 1970 — the 'Unix epoch'. Computers store dates this way because it's a single, unambiguous number that's easy to compare and do math on.
- Why do some timestamps have 10 digits and others 13?
- 10 digits usually means seconds since the epoch (used by Unix/Linux, most APIs, and databases). 13 digits usually means milliseconds (used by JavaScript's Date.now() and many web APIs). This tool lets you pick either.
- Does a Unix timestamp include a timezone?
- No — a Unix timestamp always represents a single, absolute instant in UTC. Timezones only come into play when you format that instant into a human-readable string, which is why this tool shows both your local time and UTC, plus a picker for any other zone.
- What happens if I ask for a local time that doesn't exist, like during a DST change?
- Clocks skip an hour on the 'spring forward' day, so a time like 02:30 genuinely never happens in some zones on that date. Rather than silently pick a nearby instant, this tool tells you the local time doesn't exist and shows the gap. On the 'fall back' day, the opposite happens — a hour repeats — so the same local time refers to two different instants, and this tool shows both.
- What happens in 2038?
- Systems that store epoch seconds in a signed 32-bit integer will overflow on January 19, 2038 (the 'Year 2038 problem'). Most modern systems use 64-bit integers and aren't affected.
- Can this decode a Snowflake ID, MongoDB ObjectId, ULID or UUID?
- Yes — paste any of them into the box above and the tool recognises the shape automatically: a MongoDB ObjectId's first 4 bytes, a ULID or UUID v7's first 48 bits, a UUID v1's 100-nanosecond tick count, or a Discord-style Snowflake's top bits are all decoded into the moment they encode.
- What does it mean when the tool flags a value as a sentinel?
- Some numbers are almost never a real moment in time — 0 and -1 usually mean 'unset', 2147483647 is the instant a 32-bit signed timestamp overflows, and 253402300799 (year 9999) is a common 'never expires' placeholder. The tool names these instead of showing a confident-looking date that doesn't mean what it appears to.
- Does it handle nanosecond and microsecond timestamps accurately?
- Yes, exactly — the conversion engine uses BigInt end to end instead of JavaScript's Number type. Number can only represent integers exactly up to 2^53 (9,007,199,254,740,991), so a 19-digit nanosecond timestamp like Go's UnixNano() or a ClickHouse/InfluxDB/OpenTelemetry value silently loses its last few digits in most converters. This one doesn't, and it tells you when a conversion (like nanoseconds down to milliseconds) is inherently lossy rather than staying silent about it.
- Can I add or subtract time from a timestamp, or find the difference between two?
- Yes — the Time math tab adds or subtracts years, months, days, hours, minutes and seconds from any resolved instant, and computes the signed difference between two timestamps. Years, months and days step the calendar date and re-resolve against your chosen time zone, so adding a day across a daylight-saving change is correctly 23 or 25 real hours, not a blind +86,400,000ms. The same tab also gives you the start and end epoch of a day, week, month, quarter or year — the exact pair a SQL WHERE ts BETWEEN … clause needs.
- Does this tool give me code to convert timestamps in my own language?
- Yes — the Formats & code tab has real, runnable snippets for parsing an epoch timestamp, formatting it, and getting the current time, in Python, JavaScript, Java, C#, Go, PHP, Ruby, Rust, SQL (Postgres, MySQL, SQL Server, SQLite), shell, PowerShell and Excel. Every snippet uses the same example instant so you can compare two languages line for line, and nothing is simulated — it's code you can paste and run.
- Can it convert to and from Windows FILETIME, .NET Ticks, Excel dates or other non-Unix epochs?
- Yes — the Formats & code tab converts the resolved instant into Windows FILETIME/LDAP time, .NET DateTime.Ticks, Chrome/WebKit time, Excel's OLE Automation date (the '45678' a CSV import sometimes shows instead of a date), Cocoa/Core Data time, Mac HFS+ time, NTP time, GPS time and the astronomical Julian Day — each format's base date and unit is listed on the Reference tab.
Explore more tools
Last updated .