Unix Timestamp Converter
Convert between Unix timestamps, ISO 8601 dates, and human-readable times
Accepts Unix seconds (10 digits), milliseconds (13), microseconds (16), nanoseconds (19), or any ISO 8601 / RFC 2822 date string. Numeric units are auto-detected.
How to Unix Timestamp Converter Online
Convert between Unix timestamps, ISO 8601 dates, and human-readable time formats.
- Paste a Unix timestamp (in seconds, milliseconds, microseconds, or nanoseconds) into the input field, or type an ISO 8601 / RFC 2822 date string.
- The tool detects the input format automatically. For numeric input it shows which unit (s/ms/us/ns) it inferred from the magnitude.
- Click "Use current time" to fill the field with the current Unix-seconds timestamp.
- Read off any of the six output rows: Unix seconds, Unix milliseconds, ISO 8601, RFC 7231/UTC, local time (in your detected time zone), or a relative phrase like "3 hours ago".
- Click the Copy button next to any row to put that value on your clipboard.
- The relative-time row updates once per second so it stays current while the page is open.
About Unix Timestamp Converter
A timestamp is a number representing a single instant in time, agreed by convention to count from a specific origin called the **epoch**. The Unix epoch — midnight UTC on 1 January 1970 — is the dominant convention in computing today: it is what every Unix-derived operating system, every database (in seconds, milliseconds, or microseconds), and every modern programming language uses as its native time representation. Storing time as "seconds since 1970" instead of "year 2024, June 1, 12:00 PM" eliminates time-zone confusion, daylight-saving anomalies, calendar reform headaches, and locale-specific date formatting — at the cost of being incomprehensible to humans without conversion.
The trick to using timestamps fluently is recognizing the unit. JavaScript's `Date.now()` returns milliseconds since the epoch (13 digits in the current century). Python's `time.time()` returns seconds with a fractional part (10 digits + decimal). Go's `time.Now().Unix()` returns seconds as an int64 (10 digits). PostgreSQL's `EXTRACT(EPOCH FROM …)` returns seconds. MongoDB's `Date` type and Kafka's record timestamps use milliseconds. Tracing tools like OpenTelemetry use nanoseconds (19 digits) for sub-millisecond resolution. The converter auto-detects by magnitude: under 10¹¹ is seconds, under 10¹⁴ is milliseconds, under 10¹⁷ is microseconds, and beyond that is nanoseconds. This mapping covers every realistic timestamp you will encounter.
For human-readable output, the modern standard is **ISO 8601** — `2024-06-01T12:00:00Z`. It puts the most significant unit first (so strings sort correctly), uses fixed-width fields, and uses `Z` or an explicit offset (`+05:30`) to disambiguate time zone. ISO 8601 is what every database accepts in string form, what every API contract should specify, and what every log file should record. The older **RFC 7231** format (`Sat, 01 Jun 2024 12:00:00 GMT`) survives because HTTP requires it in the `Date`, `Last-Modified`, and `Expires` headers, and because email metadata uses a close cousin (RFC 2822). Both formats describe the same instant; ISO is for code, RFC is for protocol headers.
**Time zones** are a separate axis. A Unix timestamp is unambiguous because it is by definition UTC. ISO 8601 strings can be UTC (the `Z` suffix), have an explicit offset (`+05:30`), or — dangerously — have no zone information at all, in which case different parsers will interpret them differently. The local-time row in the converter applies your operating system's current zone rules, including any pending daylight-saving transition. JavaScript's built-in `Date` cannot represent an arbitrary named zone; for that you need a library like `date-fns-tz` or `luxon`.
One practical hazard: the **Year 2038 problem.** Unix seconds counted as a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC. Most modern code uses 64-bit integers and is unaffected, but legacy embedded systems and unpatched older databases still hit it. If you are storing Unix timestamps in a column or struct, confirm the underlying type is at least 64-bit — and if you have any doubt, switch to milliseconds, which already overflows a 32-bit signed integer and forced the upgrade decades ago.
All parsing, formatting, and relative-time arithmetic runs in your browser as a small pure function (under 2 KB). The relative-time row ticks once a second via `setInterval` while the page is open. Nothing leaves your device.
Related Tools
Frequently Asked Questions
What is the Unix timestamp?
It is the number of seconds since 00:00:00 UTC on 1 January 1970 (the "Unix epoch"). It does not count leap seconds — it is a continuously increasing integer that ignores them. As of 2024 a Unix timestamp is roughly 1.7 billion seconds; in 2038 it will exceed 2³¹ - 1 = 2,147,483,647, which is the famous "Year 2038 problem" for 32-bit signed integer storage.
How does the converter know whether my number is in seconds, milliseconds, or microseconds?
By magnitude. Up to about 10¹¹ a value covers any plausible date in seconds (year 5138 AD). Above that and below 10¹⁴ it must be milliseconds (Date.now() returns this). Above that and below 10¹⁷ it is microseconds (Python's time.time_ns() / 1000, OpenTelemetry timestamps). Above 10¹⁷ it is nanoseconds. This unambiguous mapping covers every common unit used by modern languages and tools.
Why does JavaScript use milliseconds when most languages use seconds?
Historical accident. Java's `System.currentTimeMillis()`, released in 1995, returned milliseconds for higher precision than the 1-second Unix tradition. JavaScript copied Java for `Date.now()` and locked the convention in. Most modern languages — Python (`time.time()`), Go (`time.Now().Unix()`), Rust (`SystemTime`), Ruby (`Time.now.to_i`) — return seconds by default.
What is the difference between ISO 8601 and RFC 7231 / RFC 2822?
They are different date string formats. **ISO 8601** is the modern standard: `2024-06-01T12:00:00Z` (year-month-day with a T separator and a Z for UTC). It sorts lexicographically and parses unambiguously. **RFC 7231/RFC 2822** is the older HTTP / email format: `Sat, 01 Jun 2024 12:00:00 GMT`. It is human-readable but harder to parse and locale-sensitive. ISO 8601 is what you want for any new code; RFC formats survive because HTTP headers and email metadata still require them.
Why does my local time differ from UTC?
Because your computer is set to a time zone. The ISO and UTC rows show the absolute moment in coordinated universal time; the "Local time" row applies your operating system's current time-zone rules, including daylight saving. The converter uses `Intl.DateTimeFormat().resolvedOptions().timeZone` to show which zone is being applied.
Does this support time zones other than UTC and local?
Not directly. JavaScript's built-in Date object only knows about UTC and the user's local time zone. For arbitrary zone conversion you would need a library like `date-fns-tz` or `luxon`. If you have a workflow that needs, say, "show this in Pacific Time," consider opening that timestamp in those tools — or convert the local-time output to your target zone mentally using the offset.
Is any input sent to a server?
No. Parsing and formatting are pure JavaScript operations running in your browser. The page does not call out, and the relative-time display ticks once per second client-side using `setInterval`.