Unix timestamp converter: 10-digit seconds, 13-digit milliseconds
Paste a 10-digit (seconds) or 13-digit (milliseconds) timestamp to get local time, UTC, and ISO 8601, or pick a date and time to convert the other way. Seconds and milliseconds differ by a factor of 1000, and the tool decides by magnitude.
Open the tool:Timestamp Converter
When you actually need it
A log line contains nothing but a number and you need to know what local time and UTC it represents. When debugging across time zones, seeing both side by side beats doing arithmetic in your head.
Before writing a timestamp to a database or API, you need to turn 2026-10-25 15:30:00 into Unix seconds and confirm there is no offset. Some APIs want seconds, others want milliseconds, and a factor-of-1000 mistake is far from subtle.
You are checking a third-party expires_at or iat field: first work out whether it is seconds or milliseconds, then judge whether the decoded time makes sense.
- Turn a bare number in a log into local time and UTC
- Convert a local datetime to seconds before writing to a database
- Check whether an API field is seconds or milliseconds
- Compare local time with UTC
How to get it right
Count the digits: 10 digits is seconds, 13 is milliseconds, and they differ by 1000. This tool compares the absolute value against 10^11 — below is seconds, at or above is milliseconds — so 12- and 13-digit values are milliseconds while 11 digits still counts as seconds. Input with a decimal point is treated as milliseconds. If unsure, press Now and compare the digit count.
In JavaScript, the Date constructor takes milliseconds, so seconds must be multiplied: new Date(sec * 1000). Going the other way, use Math.floor(Date.now() / 1000). Passing Date.now() where seconds are expected produces a value about 1000 times too large.
Time zones: local time is rendered in the browser's time zone, with daylight saving handled by the browser's rules for that zone; the UTC and ISO lines are always UTC, and ISO looks like 2026-10-25T07:30:00.000Z. There is no time-zone switcher, so the same timestamp can show a different local time on another machine while UTC stays the same.
Do not use 0 as a missing value. 0 is a valid instant, 1970-01-01T00:00:00Z; use null for missing and check for it explicitly.
The year 2038 problem comes from storing Unix seconds in a signed 32-bit integer, whose maximum 2,147,483,647 corresponds to 2038-01-19T03:14:07Z. This tool uses JavaScript Number and Date (double precision), so it is not affected and Date reaches roughly ±8.64e15 milliseconds. Your database column or server may still be 32-bit, so confirm that separately before writing.
- 10 digits is seconds, 13 is milliseconds — a factor of 1000
- Multiply seconds by 1000 for JavaScript Date
- Local time follows the system zone; UTC is fixed
- 0 is a valid instant; use null for missing
Alternatives and limits
On the command line, date -u -r 1761328800 (macOS) or date -u -d @1761328800 (Linux) prints UTC directly, and date -u +%s gives the current seconds. Useful for batch conversion in scripts.
In code, use time-zone-aware APIs: Python's datetime.fromtimestamp(ts, tz=timezone.utc), Java's Instant.ofEpochSecond, or Go's time.Unix. They handle zones and formatting correctly.
To see wall-clock time in New York, London, and Tokyo at once, or to parse an ISO string with an offset such as 2026-10-25T15:30:00+08:00, use a tool with time-zone selection or a date library. This tool accepts only numeric timestamps and a local datetime input, and does no date arithmetic.
- Batch conversion in scripts → date
- Application code → a zone-aware date API
- Multiple zones or offset-bearing ISO strings → a dedicated tool
- No offset parsing and no time-zone switching here
FAQ
What is the difference between a 10-digit and a 13-digit timestamp?
Units. 10 digits is Unix seconds, 13 digits is milliseconds, and the two differ by a factor of 1000: 1761328800 seconds and 1761328800000 milliseconds are the same instant. Feeding seconds to an API that expects milliseconds, or the reverse, makes the value 1000 times too large or too small — usually obvious, but easy to miss when the field is just a number in a payload. This tool treats values below 10^11 as seconds and values at or above it as milliseconds, and any input with a decimal point as milliseconds.
Will the year 2038 problem affect this tool?
No. The 2038 problem comes from storing Unix seconds in a signed 32-bit integer, whose maximum 2,147,483,647 is 2038-01-19T03:14:07Z. This tool uses JavaScript Number and Date, which are double precision, so it converts dates well past 2038; Date itself tops out around ±8.64e15 milliseconds. The database column or server you are writing to may still be 32-bit, so check that separately.
What does a timestamp of 0 or a negative timestamp mean?
0 is the Unix epoch, 1970-01-01T00:00:00Z, and it is a perfectly valid instant, not a null value. Negative values are times before the epoch and are valid too. If you need to represent missing data, use null rather than 0, because 0 will render as a real date and quietly hide the bug.
Related tool:Timestamp Converter