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.
| Format | Value |
|---|
| Unit | Timestamp |
|---|
| Unit | Value |
|---|
How to use the Milliseconds to Date
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.
| Unit | Digits (approx) | Example value | Used by |
|---|---|---|---|
| Seconds | 10 | 1700000000 | POSIX/Unix systems, most REST APIs, server logs |
| Milliseconds | 13 | 1700000000000 | JavaScript Date.now(), Java, Android, databases |
| Microseconds | 16 | 1700000000000000 | Python 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.
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 format | Result |
|---|---|
| ISO 8601 UTC | 2023-11-14T22:13:20.000Z |
| Local time (UTC+4) | 14 November 2023 at 02:13:20 |
| Relative time | ~18 months ago |
| Unix seconds | 1700000000 |
Duration Calculator worked example
A load test captures startTime = 1700000000000 and endTime = 1700002700000. The Duration Calculator shows:
| Unit | Elapsed time |
|---|---|
| Milliseconds | 2,700,000 ms |
| Seconds | 2,700.000 s |
| Minutes | 45.0000 min |
| Hours | 0.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
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.
→