ToolConvoyToolConvoyv2.6
DEV

Date to Epoch — Convert Dates to Unix Timestamps

Convert dates and times to Unix timestamps (epoch seconds). Millisecond and nanosecond variants, all in your browser. No uploads, no limits.

● LOCAL · GENERATED IN YOUR TAB0 network requests from tools since page load

Date to Epoch

Convert dates and times to Unix epoch timestamps. Works entirely in your browser — no uploads.

Unix timestamps are the lingua franca of time in computing. Every database, every log file, every API, every scheduler uses them. They are timezone-independent (the same number means the same instant everywhere on Earth), they sort correctly (a larger number is always a later time), they round-trip cleanly (convert to a number, store it, read it back, convert to a date — no information loss), and they have a single canonical definition (seconds since 00:00:00 UTC on January 1, 1970). The reason a tool exists for what is effectively floor((date - 1970-01-01) / 1000) is that the three timezone subtleties — local time vs UTC, seconds vs milliseconds, DST transitions — are annoying to get right, and the wrong answer is a timestamp that is off by hours.

The non-obvious thing about Date-to-Epoch is the precision question. The canonical Unix timestamp is in seconds, but most modern systems use milliseconds (JavaScript’s Date.now(), Java’s System.currentTimeMillis(), Python’s time.time() returns seconds, .time.time_ns() returns nanoseconds). The tool emits all three precisions so you can pick the one that matches the destination. A common bug is mixing precisions — comparing a millisecond timestamp to a second timestamp and getting a date in 1970 instead of 2026. The tool’s side-by-side display helps catch this before pasting.

For a final hand-off: if the timestamp is going into a database, confirm the column type — most databases have a TIMESTAMP or BIGINT column, and the precision (seconds vs milliseconds) needs to match. If the timestamp is going into a log file or an HTTP header, the standard is seconds (RFC 7231 dates use seconds, ISO 8601 with sub-second precision is also acceptable). If the timestamp is for a cron job or a scheduled task, the Cron-to-Human tool can validate the schedule in human-readable form after you have the time. The tool here gives you the number; the destination determines what to do with it.

Advertisement

How to use

  1. Enter a date and time

    Pick a date from the calendar input and a time from the clock input. The default is 'now' in your browser's timezone. ISO 8601 strings (`2026-06-16T14:30:00Z`) are also accepted in the text input.

  2. Pick a timestamp precision

    Choose seconds (standard Unix time), milliseconds (JavaScript's `Date.now()` and most server logs), or nanoseconds (Go's `time.Now().UnixNano()` and some high-resolution telemetry). The output updates per precision.

  3. Copy the timestamp

    Click any row in the output to copy that timestamp to the clipboard. The current time and the parsed time are shown side by side so you can verify the conversion before pasting.

Frequently asked

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970 (the Unix epoch). It is timezone-independent — the same instant in time is the same number in every timezone. 2026-06-16T00:00:00Z is 1749936000.

Why are there seconds, milliseconds, and nanoseconds?

Different systems use different precisions. Unix C APIs use seconds. JavaScript and Java use milliseconds. Go and some high-resolution telemetry use nanoseconds. The tool emits all three so you can pick the one that matches your destination.

How is the timezone handled?

The default is your browser's local timezone. The 'UTC' toggle switches to UTC for the input. ISO 8601 strings with a `Z` suffix or a numeric offset are interpreted in that offset; ISO 8601 strings without a suffix are interpreted in the browser's local time.

Can I convert a date in the future or the distant past?

Yes — the Unix timestamp format handles dates from 1970 to 2038 with 32-bit signed integers, and from 1970 to year 292 billion with 64-bit. JavaScript's `Date` object is limited to ±275,000 years from 1970; the tool follows the JavaScript limit.

What about leap seconds?

Unix time ignores leap seconds — every UTC day is exactly 86,400 seconds. The Unix timestamp for 2016-12-31T23:59:60 (the actual leap second) is the same as 2017-01-01T00:00:00. This matches what `date +%s` and most libraries return.

Limitations

  • JavaScript Date rangeThe tool uses JavaScript's `Date` object internally, which handles dates from approximately -271,821-04-20 to +275,760-09-13. Dates outside that range produce `NaN` or `Invalid Date`. For pre-historic or far-future dates, use a Python or Java tool.
  • No business-day logicThe tool converts calendar dates. It does not know about business days, holidays, or working hours. For business-day arithmetic, layer the tool's output through a library like `business-time` or `workalendar` after the conversion.
  • No calendar system conversionInput and output are in the Gregorian calendar. The tool does not convert to/from the Julian calendar, the Islamic calendar, or other calendar systems. For historical dates before 1582, the result may be off by days due to the Gregorian reform.

Platform notes

macOS
macOS Terminal: `date -j -f '%Y-%m-%d %H:%M:%S' '2026-06-16 14:30:00' +%s` is the CLI equivalent. The browser tool is the right pick for quick conversions where opening a terminal is not worth the setup time.
Windows
PowerShell: `[DateTimeOffset]::Parse('2026-06-16T14:30:00Z').ToUnixTimeSeconds()` is the .NET equivalent. The browser tool is the right pick for cross-platform consistency — the same input produces the same output on every platform.
Linux
GNU coreutils: `date -d '2026-06-16 14:30:00 UTC' +%s` is the CLI equivalent. The browser tool is the right pick for content pasted from a chat, an email, or a documentation page where retyping is impractical.
CLI
The same conversion logic is available in every language's standard library: Python's `calendar.timegm()`, Ruby's `Time.now.to_i`, Go's `time.Parse().Unix()`. The browser tool is the right pick for ad-hoc conversions that do not warrant a script.
Web
Runs entirely client-side. Works offline once the page has loaded. The conversion uses JavaScript's `Date` object, which has known quirks around DST boundaries — for critical conversions, verify the result against a reference clock.
Advertisement

Related tools

Advertisement