LazyTools Header
Milliseconds to Date Converter — Duration Calculator & Batch ms Converter | LazyTools
Developer Tool

Free Milliseconds to Date Converter — With Duration Calculator

Convert any millisecond timestamp to a human-readable date — or any date back to its millisecond value. Supports milliseconds, seconds and microseconds with auto-detection. Furthermore, the unique Duration Calculator tab takes two millisecond timestamps and shows the exact elapsed time between them in every unit simultaneously — from milliseconds to weeks.

ms / s / μs supportBidirectional conversionDuration between two timestampsRelative time labelFree & private

How to use the Milliseconds to Date

1
Paste a millisecond timestamp
Enter any 13-digit millisecond timestamp in the first field. Furthermore, use the unit selector to tell the tool whether your value is in seconds (10 digits), milliseconds (13 digits) or microseconds (16 digits). The tool then converts correctly to match your input unit.
2
Click Use Now for the current timestamp
Click Use Now to insert the current time as a millisecond timestamp. Additionally, this is useful for quickly generating a reference timestamp for logs, tests or API payloads without calculating the value manually.
3
Click Convert to Date
The result table shows the date in ISO 8601 UTC, local time, UTC readable, date-only, Unix seconds and Unix milliseconds formats simultaneously. Furthermore, each row has its own Copy button for quick pasting into code or documents.
4
Switch to Date → ms for the reverse conversion
Click the Date → ms tab, enter a date and optional time, then click Get Milliseconds. Furthermore, the tool outputs all three timestamp units — milliseconds, seconds and microseconds — together in one table.
5
Use Duration Calculator for elapsed time between two timestamps
Click the Duration Calculator tab. Paste two millisecond timestamps — a start and an end. Furthermore, clicking Calculate Duration shows the exact elapsed time in milliseconds, seconds, minutes, hours, days and weeks simultaneously — useful for benchmarking and performance analysis.

Millisecond timestamp units and auto-detection

Three precision levels appear in different systems. The correct unit affects the output by factors of 1,000. Furthermore, using the wrong unit produces dates thousands of years in the future or the distant past — the most common millisecond conversion mistake.

UnitDigits (approx)Example valueUsed by
Seconds101700000000POSIX/Unix systems, most REST APIs, server logs
Milliseconds131700000000000JavaScript Date.now(), Java, Android, databases
Microseconds161700000000000000Python time.time_ns()//1000, InfluxDB, high-frequency trading

How the Duration Calculator helps developers

Performance benchmarking captures start and end timestamps as millisecond values. Furthermore, this removes the need to write throwaway conversion code during debugging sessions. Comparing a 2,700,000 ms elapsed time to "45 minutes" is far more intuitive than the raw number.

How millisecond timestamps are converted to dates

A millisecond timestamp counts the number of milliseconds since the Unix Epoch — 1 January 1970 at 00:00:00 UTC. Furthermore, JavaScript's Date constructor accepts this value directly and converts it to a Date object in the browser's local timezone.

Date = new Date( milliseconds_since_epoch )
Epoch = 1 January 1970, 00:00:00 UTC (timestamp 0)
Seconds → ms = multiply by 1,000
Microseconds → ms = divide by 1,000
Duration = |End ms − Start ms| = elapsed milliseconds

The off-by-1000 bug

The most common timestamp bug is treating a seconds value as milliseconds. The result is a date in the year 56000 CE — visibly wrong. Furthermore, treating a milliseconds value as seconds produces a date in 1970 — subtly wrong and harder to spot. The unit selector in this tool prevents both errors by converting to milliseconds before passing to the Date constructor.

Worked example: debugging an API response

A developer finds a created_at field returning 1700000000000 in a JSON response. They need to verify this is a valid recent timestamp.

Output formatResult
ISO 8601 UTC2023-11-14T22:13:20.000Z
Local time (UTC+4)14 November 2023 at 02:13:20
Relative time~18 months ago
Unix seconds1700000000
The timestamp 1,700,000,000,000 ms is 14 November 2023 — a valid and recent date. Furthermore, the 13-digit length confirms it is in milliseconds, not seconds. A 10-digit value like 1700000000 represents the same moment in Unix seconds.

Duration Calculator worked example

A load test captures startTime = 1700000000000 and endTime = 1700002700000. The Duration Calculator shows:

UnitElapsed time
Milliseconds2,700,000 ms
Seconds2,700.000 s
Minutes45.0000 min
Hours0.750000 h

What is a millisecond timestamp?

A millisecond timestamp counts elapsed milliseconds since the Unix Epoch — 1 January 1970 at 00:00:00 UTC. Furthermore, this reference point is the same one used by seconds-based Unix timestamps. Furthermore, it is the most common timestamp format in web development, used by JavaScript's Date.now(), Java's System.currentTimeMillis() and Android's timestamp APIs.

Millisecond precision became standard because applications need finer granularity than whole seconds. Furthermore, a page load of 847ms requires that precision to report accurately. Moreover, financial systems, game engines and real-time event processing all depend on millisecond-level timestamps for ordering and deduplication.

Where millisecond timestamps appear

REST API responses frequently include created_at and updated_at fields as Unix millisecond values. Furthermore, JWT tokens contain iat and exp fields — often in seconds. Furthermore, database systems including MongoDB, Cassandra and most SQL engines store timestamps internally as epoch milliseconds or seconds.

Server logs and monitoring tools use millisecond timestamps for event ordering. Furthermore, performance profiling tools capture millisecond start and end times for every function call. Moreover, message queues and event streams use millisecond timestamps to sequence messages correctly when multiple events arrive within the same second.

Milliseconds versus microseconds and nanoseconds

High-frequency trading, hardware performance counters and scientific instruments use microsecond (μs) or nanosecond (ns) precision. Furthermore, Python's time.perf_counter() returns a float with nanosecond resolution. Java's System.nanoTime() provides nanosecond precision for relative timing within a JVM instance. The converter handles microseconds by dividing by 1,000 before converting — normalising all inputs to milliseconds before the Date constructor receives them.

Why millisecond conversion matters for developers

Opaque timestamp values slow debugging significantly. Furthermore, converting a raw 13-digit number to a readable date takes under one second with this tool. Furthermore, instantly seeing "14 November 2023" confirms whether a record is recent or stale — a check that takes under one second with a converter but requires throwaway code without one.

The Duration Calculator addresses a specific developer need. Performance benchmarks capture start and end timestamps. The elapsed difference is a raw millisecond value. Moreover, converting that difference to minutes and hours requires a small calculation that most developers perform manually — the calculator removes this step during time-critical debugging sessions.

How timestamp format errors cause bugs

The off-by-1000 error produces invalid dates. Furthermore, treating a seconds value as milliseconds gives a date in 1970 — a subtle error that is hard to spot. Moreover, a frontend that passes a seconds timestamp to new Date() produces a date in January 1970. Additionally, a backend dividing a ms timestamp incorrectly may show correct-looking dates that are off by fractional seconds under load.

Frequently asked questions

Count the digits. A 10-digit value is almost always Unix seconds. A 13-digit value is almost always milliseconds. Furthermore, the unit selector defaults to auto-detect based on digit count — the most reliable heuristic for the vast majority of real-world timestamps. For edge cases near the year 2001 (when 10-digit second timestamps become ambiguous with 10-digit millisecond timestamps), select the unit explicitly.
JavaScript uses 64-bit floating-point numbers. The maximum safe integer is 2^53 - 1, which corresponds to the year 275,760. Furthermore, millisecond timestamps for any practical date fall well within this range. The 32-bit integer limit that causes the Year 2038 problem for second-based systems does not apply to millisecond timestamps stored as 64-bit values.
The Duration Calculator subtracts the smaller timestamp from the larger one to get the absolute elapsed milliseconds. Furthermore, it then converts that difference into seconds, minutes, hours, days and weeks by successive division. All results appear simultaneously — you choose the unit that best matches your context, whether that is "45 minutes" for a human report or "2,700,000 ms" for a technical log entry.
One millisecond equals 1,000 microseconds. Millisecond timestamps are 13 digits long in 2025. Microsecond timestamps are 16 digits long. Furthermore, microseconds are used in high-frequency trading, hardware performance counters and high-precision scientific instruments. The converter accepts microseconds and divides by 1,000 before converting to a date.
Yes. Negative millisecond timestamps represent dates before the Unix Epoch — 1 January 1970. For example, -86400000 represents 31 December 1969. Furthermore, the converter handles negative values correctly, producing the corresponding date before 1970. This is useful for historical data processing and for systems that record events relative to a reference date in the past.

Related Date & Time tools

Every tool on LazyTools runs in your browser. Nothing is uploaded or stored.

UNIX Timestamp Converter

Full Unix timestamp converter with natural language input and batch mode. Furthermore, code snippets for Python, JavaScript and SQL are included.

Date Difference Calculator

Exact gap between two dates in every unit. Additionally, milestone markers show every 100th and 1000th day.

Online Date Format Converter

Convert dates between ISO, US, EU and 20 other formats. Furthermore, batch mode converts entire columns from a spreadsheet.

Time Until Calculator

Count days, hours and minutes until any future event. Additionally, compare two events side by side to see which arrives sooner.

Date Add / Subtract

Add or subtract time from any date. Moreover, chain multiple operations in a step-by-step timeline.

Business Days Calculator

Count working days with UAE and US holiday calendars. Furthermore, add N business days to any start date.

Rate this tool

4.6
out of 5
437 ratings
5 ★
71%
4 ★
19%
3 ★
9%
2 ★
1%
1 ★
0%
How useful was this tool?