Timestamp Converter

Convert between Unix timestamps and human-readable dates. Support for seconds and milliseconds.

Current Unix Timestamp

1784270598

1784270598500 ms

Timestamp to Date

Date to Timestamp

Quick Reference

Unix epoch: January 1, 1970 00:00:00 UTC

32-bit overflow: January 19, 2038

1 day = 86,400 seconds

1 week = 604,800 seconds

What Is a Unix Timestamp?

A Unix timestamp (also called an epoch timestamp or POSIX time) is a single integer that represents a specific point in time as the number of seconds β€” or milliseconds β€” elapsed since the Unix epoch: midnight on January 1, 1970, in Coordinated Universal Time (UTC). This universal reference point was chosen when the Unix operating system was being developed in the late 1960s and early 1970s, and it has since become the most widely adopted time representation in computing.

Because a Unix timestamp is just a number, it is compact, unambiguous, and completely independent of timezones, daylight saving rules, locale settings, or calendar systems. A timestamp of 1700000000 means exactly the same point in history on every computer in the world, whether it is displayed as "November 14, 2023, 10:13 PM UTC" to one user or "November 15, 2023, 8:13 AM JST" to another.

Unix timestamps appear in virtually every modern technology stack: database columns, HTTP headers, JWT tokens, log files, file system metadata, API responses, and cryptographic certificates. Understanding how to convert between a raw timestamp and a human-readable date is a fundamental skill for developers, sysadmins, data analysts, and anyone who works with software systems.

This free online timestamp converter handles both directions instantly. Paste any Unix timestamp in seconds or milliseconds and see the equivalent ISO 8601 string, UTC string, your local time, relative time, day of the week, day of the year, and ISO week number. Or pick a date and time to get the corresponding Unix timestamp values you can copy straight into your code.

Core Conversion Formulas

milliseconds = ts_seconds Γ— 1000 | seconds = ⌊date.getTime() Γ· 1000βŒ‹

Where:

  • ts_seconds= Unix timestamp expressed in whole seconds since the epoch
  • milliseconds= Unix timestamp expressed in milliseconds (used internally by JavaScript's Date object)
  • date.getTime()= JavaScript method returning the number of milliseconds since the epoch for a given Date object
  • ⌊ βŒ‹= Floor function β€” truncates to the nearest integer toward negative infinity

Seconds vs. Milliseconds: Which Should You Use?

The two most common flavors of Unix timestamp are second-precision and millisecond-precision. Knowing which one you are dealing with is critical before converting, because treating a millisecond timestamp as seconds will land you roughly 31,000 years in the future, and treating a second timestamp as milliseconds will produce a date somewhere in the early 1970s.

A quick heuristic: if your timestamp has 10 digits (e.g. 1700000000), it is almost certainly in seconds. If it has 13 digits (e.g. 1700000000000), it is in milliseconds. This rule holds true for all dates in the roughly 1970–2286 window.

Unit Typical digit count (2020s dates) Common use cases
Seconds 10 Unix/Linux system calls, POSIX APIs, JWT "iat"/"exp" claims, most REST APIs, database integers
Milliseconds 13 JavaScript's Date.now(), Java's System.currentTimeMillis(), MongoDB ObjectIDs, browser performance APIs

This converter supports both units via the Seconds / Milliseconds toggle. Simply select the correct unit before pasting your value and the conversion will be precise regardless of which format your source system uses.

How Timestamp-to-Date Conversion Works

Converting a Unix timestamp to a human-readable date follows a straightforward sequence. The converter first normalizes your input to milliseconds (multiplying by 1000 if you selected the Seconds unit), then passes that value into JavaScript's built-in new Date(ms) constructor. From the resulting Date object, it derives every output format simultaneously:

  • Local Time β€” the date and time displayed in the visitor's own browser timezone, using the device's locale for formatting.
  • UTC β€” the date and time in Coordinated Universal Time, independent of any local offset.
  • ISO 8601 β€” the standardized machine-readable format YYYY-MM-DDTHH:mm:ss.sssZ, universally accepted by APIs and databases.
  • Relative time β€” a human-friendly approximation such as "3 days ago" or "in 2 hours," calculated by comparing the target date to Date.now().
  • Day of week β€” the full name of the weekday (e.g. Wednesday).
  • Day of year β€” computed as Math.floor((date βˆ’ new Date(year, 0, 0)) / 86400000), counting days elapsed since December 31 of the previous year.
  • ISO week number β€” the ISO 8601 week of the year (1–53), using the standard algorithm that anchors week 1 to the week containing the first Thursday of the year.

All these values update immediately as you type, making the tool ideal for quick lookups during debugging sessions, data audits, or API integration work.

How Date-to-Timestamp Conversion Works

The reverse direction β€” converting a calendar date and time back to a Unix timestamp β€” is equally useful when you need to store or transmit a date in a system that expects a numeric value. Enter a date using the date picker and a time using the time input (defaulting to midnight if left blank). The converter assembles a combined string in the format YYYY-MM-DDTHH:mm:ss and passes it to new Date().

Because this string contains no timezone offset, JavaScript interprets it as local time β€” the timezone of the device running the browser. The resulting Date object is then converted to both second-precision and millisecond-precision Unix timestamps using:

  • seconds = Math.floor(date.getTime() / 1000)
  • milliseconds = date.getTime()

Both values are displayed with one-click copy buttons so you can paste them directly into code, SQL queries, configuration files, or API request bodies without transcription errors.

One important nuance: if you need the timestamp for a specific UTC moment rather than a local-time moment, append the UTC offset manually to your date string (e.g. treat the time as UTC by setting your system clock to UTC, or remember that the converter reflects your local offset). This is a deliberate behavior β€” most use cases involve scheduling or logging events in the user's own timezone, so local-time interpretation is the safer default.

The Unix Epoch, History, and the Year 2038 Problem

The choice of January 1, 1970 as the epoch origin was largely arbitrary β€” it was simply a round date that predated the first Unix systems by a few years, giving early developers a comfortable buffer for historical records. The date has since become a cultural and technical reference point in computing, immortalized in jokes about 1970 dates appearing in applications whenever a zero timestamp is accidentally displayed as a human date.

More seriously, the Year 2038 Problem (sometimes called Y2K38) is a real concern for legacy systems. Many older 32-bit systems store timestamps as a signed 32-bit integer, which can hold a maximum value of 2,147,483,647. That value corresponds to January 19, 2038, at 03:14:07 UTC. One second later, the integer overflows to a large negative number, typically interpreted as December 13, 1901. Modern 64-bit systems are not affected β€” a signed 64-bit timestamp can represent dates hundreds of millions of years in the past and future β€” but embedded systems, databases with legacy schemas, and old firmware may still require careful migration planning.

Milestone Unix timestamp (seconds) Date (UTC)
Unix epoch origin 0 1970-01-01 00:00:00
Y2K (Jan 1, 2000) 946,684,800 2000-01-01 00:00:00
Billion-second mark 1,000,000,000 2001-09-09 01:46:40
32-bit signed overflow 2,147,483,647 2038-01-19 03:14:07

ISO 8601, UTC, and Why Format Matters

When exchanging timestamps between systems, the representation format is just as important as the numeric value. Three formats dominate modern software:

  • Unix timestamp (integer) β€” the most compact and unambiguous form; no parsing ambiguity; ideal for storage and arithmetic but unreadable by humans.
  • ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) β€” the international standard for date/time strings; the trailing Z indicates UTC; sortable as a plain string; accepted by virtually every modern programming language, database, and API.
  • RFC 2822 / UTC string β€” the format used in HTTP headers and email (Thu, 14 Nov 2023 22:13:20 GMT); human-readable but less compact.

When in doubt, store and transmit dates as Unix timestamps (integers) or ISO 8601 UTC strings. Both eliminate timezone ambiguity entirely. Avoid storing dates as locale-formatted strings (e.g. "11/14/2023") in databases or APIs β€” the month/day order differs between regions and creates parsing bugs that are notoriously difficult to trace.

This converter displays all three representations so you can choose whichever format your target system requires, then copy it with one click.

Worked Examples

Unix Epoch Origin (Timestamp 0)

Problem:

Convert Unix timestamp 0 (seconds) to a human-readable date.

Solution Steps:

  1. 1Input: timestamp = 0, unit = seconds.
  2. 2Normalize to milliseconds: 0 Γ— 1000 = 0 ms.
  3. 3Construct date: new Date(0).
  4. 4ISO 8601 output: 1970-01-01T00:00:00.000Z.
  5. 5UTC string: Thu, 01 Jan 1970 00:00:00 GMT.

Result:

January 1, 1970 at midnight UTC β€” the Unix epoch origin.

Convert Timestamp 1700000000 to Date

Problem:

Convert Unix timestamp 1,700,000,000 (seconds) to its calendar date.

Solution Steps:

  1. 1Input: timestamp = 1700000000, unit = seconds.
  2. 2Normalize to milliseconds: 1,700,000,000 Γ— 1000 = 1,700,000,000,000 ms.
  3. 3Construct date: new Date(1700000000000).
  4. 4ISO 8601 output: 2023-11-14T22:13:20.000Z.
  5. 5Day of year: Math.floor((date βˆ’ new Date(2023, 0, 0)) / 86400000) = 318.
  6. 6ISO week number: week 46 of 2023.

Result:

November 14, 2023, 22:13:20 UTC β€” a Tuesday, day 318 of 2023, ISO week 46.

Convert Date 2024-03-15 09:00:00 to Timestamp

Problem:

Get the Unix timestamp (seconds and milliseconds) for March 15, 2024 at 09:00:00 local time.

Solution Steps:

  1. 1Input: dateInput = '2024-03-15', timeInput = '09:00:00'.
  2. 2Assemble combined string: '2024-03-15T09:00:00' (interpreted as local time).
  3. 3Construct date: new Date('2024-03-15T09:00:00').
  4. 4Get milliseconds: date.getTime() β€” value depends on the local UTC offset.
  5. 5Seconds: Math.floor(date.getTime() / 1000).
  6. 6For a UTC+0 machine: milliseconds = 1,710,493,200,000; seconds = 1,710,493,200.

Result:

Seconds timestamp: 1,710,493,200 (UTCΒ±0). The exact value shifts by the browser's UTC offset β€” use a UTC-fixed date string like '2024-03-15T09:00:00Z' when timezone-agnostic results are needed.

Millisecond Timestamp from JavaScript Date.now()

Problem:

Your JavaScript code logs Date.now() = 1,705,000,000,000 ms. Convert to a readable date.

Solution Steps:

  1. 1Input: timestamp = 1705000000000, unit = milliseconds.
  2. 2No multiplication needed β€” already in milliseconds.
  3. 3Construct date: new Date(1705000000000).
  4. 4ISO 8601 output: 2024-01-11T19:33:20.000Z.
  5. 5Relative time (as of June 2026): approximately 17 months ago.

Result:

January 11, 2024, 19:33:20 UTC.

Tips & Best Practices

  • βœ“Use the 'Use Current Time' button to instantly load the current Unix timestamp β€” useful as a quick 'what is today's epoch?' reference.
  • βœ“A 10-digit timestamp is seconds; a 13-digit timestamp is milliseconds. When in doubt, check the digit count before selecting a unit.
  • βœ“The ISO 8601 copy button gives you a format accepted by virtually every modern API, database, and programming language β€” prefer it over locale-formatted strings for interoperability.
  • βœ“Remember that the Year 2038 problem only affects 32-bit integer storage. If you are auditing legacy systems, check that timestamp columns use 64-bit integer or DATETIME types.
  • βœ“When storing timestamps in databases, always prefer UTC. Display as local time in the UI layer only β€” this avoids bugs when users are in different timezones or when DST shifts occur.
  • βœ“The 'relative time' output (e.g. '3 days ago') is calculated against your browser's current clock, so it refreshes every second β€” useful for quick sanity-checking of recent log entries.
  • βœ“1 day = 86,400 seconds and 1 week = 604,800 seconds. Keep these constants handy for mental arithmetic when working with timestamp differences.
  • βœ“For JWT tokens, the 'iat' (issued-at) and 'exp' (expiration) claims are always Unix timestamps in seconds. Paste them here to instantly check when a token was issued or when it expires.

Frequently Asked Questions

A Unix timestamp is an integer representing the number of seconds (or milliseconds) elapsed since midnight on January 1, 1970, in UTC β€” a reference point called the Unix epoch. Because it is just a number with no timezone information embedded, it represents a single, unambiguous moment in time universally. It is the most widely used time format in computer systems, databases, and APIs.
Count the digits. A 10-digit timestamp (e.g. 1700000000) is almost certainly in seconds; a 13-digit timestamp (e.g. 1700000000000) is in milliseconds. This rule is reliable for all dates between 2001 and 2286. If you are unsure, try converting with both units β€” one of the resulting dates will be in a plausible range and the other will be nonsensical.
UTC (Coordinated Universal Time) is the global time standard with no offset, while your local time includes the UTC offset for your timezone β€” for example UTC+5:30 for India or UTC-8 for US Pacific. The Unix timestamp itself is always UTC-anchored; the local time is purely a display transformation applied by your browser based on your device's timezone setting. The underlying moment in time is identical.
On January 19, 2038, at 03:14:07 UTC, the maximum value of a signed 32-bit integer (2,147,483,647) will be reached. Systems that store Unix timestamps as 32-bit signed integers will overflow to a large negative number, typically displaying December 13, 1901. Modern 64-bit systems are immune, but older embedded devices, firmware, and database schemas with legacy integer types may still be affected and need to be updated before that date.
Yes, but you need to account for the offset manually. This converter's Date-to-Timestamp section interprets the entered date and time as your browser's local timezone. To target a specific timezone, first determine the UTC offset for that timezone on the target date (remembering that DST can shift the offset), then adjust your input time by that offset before entering it. Alternatively, append the offset directly to your date string (e.g. '2024-01-15T09:00:00+05:30') when working in code.
ISO 8601 is the international standard for representing dates and times, using the format YYYY-MM-DDTHH:mm:ss.sssZ where the trailing Z indicates UTC. It is preferred in software because it is unambiguous (unlike locale-specific formats like MM/DD/YYYY vs DD/MM/YYYY), sorts correctly as a plain string, is accepted by virtually every programming language and database, and clearly communicates the timezone. The ISO string output of this converter can be pasted directly into most APIs and database fields.
The ISO 8601 week number divides the year into weeks of exactly seven days, where week 1 is defined as the week containing the first Thursday of the year (equivalently, the week containing January 4). Weeks run Monday through Sunday. Because of this definition, the first and last few days of a calendar year may belong to week 52/53 of the previous year or week 1 of the next year. The ISO week is widely used in European business scheduling and logistics.

Sources & References

Last updated: 2026-06-05

πŸ’‘

Help us improve!

How would you rate the Timestamp Converter?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.