Convert a date to a Unix timestamp online
How online date-to-timestamp converters work, where time zones and seconds vs. milliseconds cause errors, and how to check and share the result safely.
An online date-to-timestamp converter turns a calendar date and time into a single number: the count of seconds, or milliseconds, since 00:00:00 UTC on January 1, 1970. The arithmetic is simple. Most mistakes come from how the tool reads your input. This review explains what the conversion changes, where it can quietly go wrong, and when a plain written date is the better choice. It describes how these converters behave in general. No specific tool was tested for this article, so it does not rate or recommend any particular site.
Is this conversion right for your use?
A Unix timestamp is the right format when software will read the value. Typical uses are database fields, API parameters, log filters, cache expiry settings and scheduled jobs. Its main benefit is that it has no ambiguity. One number identifies one instant worldwide, with no date order, language or time zone label to interpret.
The tradeoff is that people cannot read it. Most readers cannot tell what 1704067200 means, and a typo in one digit can shift the date by years without looking wrong. Use a plain written date, ideally in ISO 8601 form such as 2024-01-01T00:00:00Z, when people will read, review or edit the value. That includes documents, emails, translated content and anything a non-developer must check. When both people and software need the value, store the timestamp and show a formatted date next to it.
What the conversion actually changes
This is a change of meaning, not of appearance. It is not like reversing or mirroring text, which rearranges characters, or a Unicode "font" generator, which swaps them for look-alikes. Here the tool reads your date, pins it to a specific instant, and replaces the text with a different value: a number of elapsed seconds. You cannot recover the original wording, format or time zone label from the result. The reverse conversion, from timestamp back to date, gives you the same instant. It may display in a different format or time zone than the one you typed.
Pinning the date to an instant is the step where errors creep in. Each of the following decisions changes the output:
- Time zone: an input with no offset may be treated as UTC, as your browser's local time, or as a zone you pick from a menu. Midnight on January 1, 2024 is 1704067200 in UTC, but 1704085200 in US Eastern time (UTC-5 in winter).
- Date order: 03/04/2024 means March 4 under the US month/day convention and April 3 in many other regions. A tool that guesses the order can pick the wrong one without warning.
- Seconds or milliseconds: classic Unix time counts seconds. JavaScript and many web APIs use milliseconds, which add three digits. For present-day dates, a seconds value has 10 digits and a milliseconds value has 13.
- Daylight saving gaps and overlaps: in most US time zones, local times between 2:00 and 3:00 a.m. do not exist on the spring-forward date. Times between 1:00 and 2:00 a.m. occur twice on the fall-back date. A converter has to pick an interpretation, and it may not say which one it chose.
- Leap seconds: Unix time leaves them out, so every day counts as exactly 86,400 seconds. This rarely matters outside scientific or precise timing work.
The table below gives worked values you can use to test any converter. Each one follows from the standard definition of Unix time.
| Input | Interpreted as | Seconds | Milliseconds |
| 2024-01-01 00:00:00 | UTC | 1704067200 | 1704067200000 |
| 2024-01-01 00:00:00 | US Eastern (UTC-5) | 1704085200 | 1704085200000 |
| 1970-01-01 00:00:00 | UTC | 0 | 0 |
| 2001-09-09 01:46:40 | UTC | 1000000000 | 1000000000000 |
Before you trust a converter, enter 2024-01-01 00:00:00 with UTC selected and check that you get 1704067200. Then repeat the test with the time zone you actually need. If the tool does not show which zone it applied, treat its output as unverified.
Checking the result without a website
These standard commands give the same results offline. They also make the time zone explicit:
# GNU date (Linux), seconds
date -u -d '2024-01-01T00:00:00Z' +%s
# expected: 1704067200
# JavaScript, milliseconds (months are zero-based: 0 = January)
Date.UTC(2024, 0, 1)
// expected: 1704067200000
# Python, seconds
from datetime import datetime, timezone
datetime(2024, 1, 1, tzinfo=timezone.utc).timestamp()
# expected: 1704067200.0
Watch for one JavaScript quirk. Under the language specification, new Date('2024-01-01') is read as UTC, but new Date('2024-01-01T00:00') is read as local time. Online tools built on JavaScript can inherit this behavior. That explains why two nearly identical inputs can give results several hours apart.
Will the result stay usable after copying or sharing?
Timestamps copy cleanly in one sense. They are plain ASCII digits, with no special characters, bidirectional controls or look-alike glyphs that could break on paste. The risks lie elsewhere:
- Formatting on paste: a spreadsheet or document editor may add thousands separators or switch to scientific notation. It may also treat the value as a plain number rather than a time. Spreadsheet date systems are not Unix time, so the value needs a formula or explicit conversion before it displays as a date.
- Lost context: the number does not say whether it counts seconds or milliseconds. Label it in field names, column headers or messages, for example created_at_ms.
- Missing time zone: when you share a timestamp with a colleague, also send the local time it was meant to represent. The receiver can then see if the conversion assumed the wrong zone.
- Editing: a mistyped digit still looks like a valid timestamp. A written date at least lets a reviewer spot an impossible month or year.
- Range limits: systems that store Unix time as a signed 32-bit integer cannot go past 03:14:07 UTC on January 19, 2038. Some tools and older systems also do not handle dates before 1970, which are negative numbers. Check the destination system's documentation for both limits.
Accessibility follows from the same point. A screen reader can announce the digits, but the listener learns nothing about the date. It also cannot be searched by date: someone searching a document for "January 2024" will not find 1704067200. Wherever people are the audience, including help pages, UI labels, tables in reports and localized content, provide a formatted date. Keep the raw timestamp for machine use. This article has no tested evidence on how specific screen readers or apps handle long digit strings, so check the destinations you depend on.
Privacy
A converter's appearance or marketing tells you nothing reliable about whether your input is processed in your browser or sent to a server, or whether it is logged. A bare date is usually low risk. If the date is tied to something sensitive, such as a pasted log line, a record ID or a scheduled event, use one of the local commands above instead. Otherwise, check the tool's published privacy policy before using it.
Bottom line
An online converter is a convenient way to get a timestamp for code, queries or configuration. You can trust the result only if you know which time zone it applied and whether it returned seconds or milliseconds. Test it against a known value and label the unit when you share the number. When people need to read or edit the value, use a written ISO 8601 date instead.