Key takeaways

  • A millisecond Unix timestamp is the seconds value times 1,000, with 13 digits for current dates instead of 10.
  • JavaScript and many event payloads use milliseconds, while Unix tools, SQL databases and JWT claims use seconds.
  • AyeTab's free Unix Time Converter reads 13-digit input as milliseconds automatically and runs in the browser without uploading anything.

A Unix timestamp in milliseconds is the same count as a normal Unix timestamp, only 1,000 times larger: 13 digits today instead of 10. To read one, use a converter that spots the extra digits for you, such as the free AyeTab Unix Time Converter, or divide by 1,000 before you treat it as seconds.

Where millisecond timestamps show up

If you watch systems for a living, you see both units every day, often in the same incident:

  • Browser and Node.js code. Date.now() returns milliseconds, so anything a JavaScript app logs or sends tends to use them.
  • Event and analytics payloads. Many tracking and webhook formats carry milliseconds, which keeps events within the same second apart.
  • Server logs and databases. Unix tools, PHP and most SQL databases default to seconds.
  • Tokens. JWT exp and iat claims are in seconds, which surprises people who build them in JavaScript.

Put an alert from one source next to a log line from another and you can be comparing 1800000000 with 1800000000000. Both mean 08:00 UTC on 15 January 2027.

How to tell the units apart

Digits Unit Example Readable (UTC)
10 Seconds 1800000000 2027-01-15 08:00:00
13 Milliseconds 1800000000000 2027-01-15 08:00:00.000
16 Microseconds 1800000000000000 Same moment
19 Nanoseconds 1800000000000000000 Same moment

The digit count holds for any date from late 2001 until 2286, which covers almost every log you will read.

Converting milliseconds with AyeTab

Paste a 13-digit value into AyeTab's "Timestamp or date" field and it is read as milliseconds without a toggle. The cards show the value in seconds and in milliseconds, ISO 8601 in UTC, your local time with its zone name, a UTC date and a relative time such as "2 hours ago". That last card is useful during an incident: it tells you at a glance whether an event is from this morning or from last week. Click any card to copy it into your notes or a ticket.

The conversion runs in your browser. AyeTab uploads nothing and needs no account, which is the right default when the timestamp sits in a log line next to user IDs or internal hostnames. Use it on app.ayetab.com, or install the free AyeTab extension to keep it on your Chrome new tab page and in a side panel while you work through a dashboard.

Converting in code

When a script needs to handle both units, normalise on the way in:

  • JavaScript: new Date(ms) takes milliseconds directly; for seconds use new Date(s * 1000).
  • Python: datetime.fromtimestamp(ms / 1000, tz=timezone.utc).
  • SQL: most functions expect seconds, so divide millisecond columns by 1000 first, for example TO_TIMESTAMP(ms / 1000.0) in PostgreSQL.

Store one unit in your own data and name the field after it, such as created_at_ms. That one habit prevents most of the off-by-1,000 bugs, and it makes the next incident review easier because nobody has to guess what a raw number in a dashboard means.

When to use something else

AyeTab's converter covers seconds and milliseconds. Traces and some databases record microseconds or nanoseconds, and for those 16 and 19 digit values epochconverter.com is the better choice. For a whole log file, convert with a script rather than one value at a time.

Frequently asked questions

How do I convert a millisecond timestamp to a date?

Paste it into a converter that detects milliseconds, such as AyeTab's, or divide by 1,000 and convert it as seconds.

Why is my timestamp 13 digits long?

It is in milliseconds. JavaScript's Date.now() and many event APIs produce this format.

How do I convert microseconds or nanoseconds?

Divide by 1,000,000 or 1,000,000,000 to get seconds, or use epochconverter.com, which reads 16 and 19 digit values.

Sources

  1. Unix Time ConverterAyeTab
  2. AyeTabAyeTab
  3. Epoch Converterepochconverter.com
  4. Date.now()MDN Web Docs
  5. datetime: basic date and time typesPython Software Foundation