Milliseconds to Date Converter Online
Paste a millisecond timestamp to get a readable date, or enter a date to get milliseconds. Time Shuttle auto-detects whether your value is in seconds or milliseconds, keeps the sub-second part intact, and runs entirely in your browser — nothing is uploaded.
You will also see this called millis to date — "millis" is the everyday shorthand in Java (System.currentTimeMillis()), in log output, and in Elasticsearch's epoch_millis format. It means exactly the same thing as milliseconds, and the same field below handles it.
How to Convert Milliseconds to a Date
- Paste the millisecond value: Drop the 13-digit number into the input field. No need to tell the tool what unit it is — a 13-digit value is read as milliseconds and a 10-digit value as seconds.
- Read any format you need: The result appears immediately as ISO 8601, RFC 2822, UTC string, a localized date, and relative time ("3 hours ago"). The
.123fraction is preserved in the ISO output. - Copy it: Every row has a one-click copy button.
How to Convert a Date to Milliseconds
The same tool runs in reverse. Switch to Date → Timestamp mode and type a date in any format JavaScript understands — 2026-07-30, 2026-07-30T07:48:25.123Z, or July 30, 2026 07:48. You get the Unix value in both seconds and milliseconds, so you can copy whichever unit your code expects.
Converting a bare time to milliseconds works the same way — supply a full date with the time (2026-07-30 07:48:25.123) so the result is anchored to a real instant. A time on its own has no epoch offset, so any "time to milliseconds" conversion needs a date to attach it to.
If your input has no timezone suffix it is interpreted in your local timezone. Append Z to force UTC, or use the timezone tab to pin the wall-clock time to a specific IANA zone.
Seconds or Milliseconds? Count the Digits
Unix timestamps carry no unit marker, so the length of the number is the practical signal:
- 10 digits = seconds. This holds for every date from 2001-09-09 through 2286-11-20.
- 13 digits = milliseconds. Same era, three extra digits of precision.
- 16 or 19 digits are microseconds and nanoseconds — common in tracing systems and in databases like ClickHouse.
A quick sanity check: a seconds timestamp for today starts with 17… and a milliseconds timestamp for today also starts with 17… but is three digits longer. If your number lands in 1970 or in the year 58,000, the unit is wrong — see the next section.
The Seconds/Milliseconds Mix-Up (and How to Spot It)
This is the single most common timestamp bug, and it has two symptoms that immediately tell you which direction you got wrong.
Symptom 1 — your date shows as January 1970. You passed seconds to something expecting milliseconds. JavaScript's Date constructor takes milliseconds, so:
new Date(1785397705) // 1970-01-21T15:56:37.705Z ← wrong
new Date(1785397705000) // 2026-07-30T07:48:25.000Z ← right
Symptom 2 — an out-of-range error or an absurd year. You passed milliseconds to something expecting seconds. Python is explicit about it:
datetime.fromtimestamp(1785397705123, timezone.utc)
# ValueError: year 58547 is out of range
datetime.fromtimestamp(1785397705123 / 1000, timezone.utc)
# 2026-07-30 07:48:25.123000+00:00 ← right
The fix in both directions is a factor of 1000: ms = s × 1000, s = ms ÷ 1000. Use integer division when going down to seconds if you want to truncate rather than round.
Millisecond Timestamps in Every Language
| Language | Current time in millis | Millis → date |
|---|---|---|
| JavaScript | Date.now() | new Date(ms).toISOString() |
| Python | int(time.time() * 1000) | datetime.fromtimestamp(ms / 1000, timezone.utc) |
| Java | System.currentTimeMillis() | Instant.ofEpochMilli(ms) |
| Go | time.Now().UnixMilli() | time.UnixMilli(ms) |
| PHP | (int) round(microtime(true) * 1000) | date('c', intdiv($ms, 1000)) |
| Ruby | (Time.now.to_f * 1000).to_i | Time.at(ms / 1000.0).utc |
| C# | DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() | DateTimeOffset.FromUnixTimeMilliseconds(ms) |
| PostgreSQL | EXTRACT(EPOCH FROM now()) * 1000 | to_timestamp(ms / 1000.0) |
| MySQL | UNIX_TIMESTAMP(NOW(3)) * 1000 | FROM_UNIXTIME(ms / 1000) |
Shell note: date +%s%3N only works with GNU coreutils. On macOS the BSD date does not expand %3N and you get a corrupt value ending in a literal 3N. Use gdate +%s%3N, or python3 -c 'import time;print(int(time.time()*1000))'.
Precision: When Milliseconds Are Not Enough
Millisecond timestamps are safe to handle as ordinary numbers in JavaScript. Number.MAX_SAFE_INTEGER is 9,007,199,254,740,991 — about 285,000 years' worth of milliseconds — so there is no precision risk for any realistic date.
That changes at microseconds and nanoseconds. A 19-digit nanosecond timestamp exceeds the safe integer range, and parsing it with Number() silently rounds the last digits. Use BigInt for those, or convert down to milliseconds before it reaches JavaScript. To reason about the scale gaps, the time unit converter maps every unit from years down to yoctoseconds.