Timestamp Converter
Convert between Unix timestamps and readable dates.
This tool uses JavaScript's Date object and Intl.DateTimeFormat API for timestamp conversion. All processing happens in your browser with your local timezone.
Understanding Unix Timestamps
A Unix timestamp (also known as Epoch time or POSIX time) counts the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. This standardized time representation is used across operating systems, programming languages, and databases. JavaScript uses milliseconds (13 digits) while most other systems use seconds (10 digits). This tool automatically detects and handles both formats.
How Timestamp Conversion Works▾
A Unix timestamp represents the number of seconds (or milliseconds) elapsed since January 1, 1970, 00:00:00 UTC — known as the Unix epoch. This tool automatically detects whether your input is in seconds (10 digits, e.g., 1716200000) or milliseconds (13 digits, e.g., 1716200000000) and handles the conversion accordingly.
The conversion process uses JavaScript's Date constructor: new Date(timestamp * 1000) for seconds, or new Date(timestamp) for milliseconds. The resulting Date object provides methods for extracting year, month, day, hours, minutes, and seconds in both UTC and local timezone.
For display formatting, the tool uses the Intl.DateTimeFormat API, which provides locale-aware date formatting without any external libraries. ISO 8601 format (e.g., 2026-05-20T14:30:00Z) is generated using Date.toISOString().
Input validation includes range checking (timestamps before year 1970 or after year 9999 are flagged), NaN detection, and automatic format detection based on digit count.
Step-by-Step Usage Guide▾
1. Enter a Unix timestamp in the input field (seconds or milliseconds).
2. The tool automatically detects the format and converts to human-readable date.
3. Results show UTC time, ISO 8601 format, and your local timezone.
4. To convert a date to timestamp, use the date picker input.
5. The current timestamp is shown at the top for reference.
Common Timestamp Formats▾
Unix Seconds: 10-digit number, used in most programming languages (Python, PHP, C).
Unix Milliseconds: 13-digit number, used in JavaScript (Date.now()), Java (System.currentTimeMillis()).
ISO 8601: Human-readable format like 2026-05-20T14:30:00Z, universally supported.
RFC 2822: Email date format like "Mon, 20 May 2026 14:30:00 +0000".
Note: Timestamps are timezone-independent — they always represent the same absolute moment in time regardless of the observer's timezone.
Related Articles
Related Tools
Frequently Asked Questions
What is a Unix timestamp?▾
A Unix timestamp is the number of seconds since January 1, 1970, 00:00:00 UTC (the Unix epoch). It is widely used in programming and databases.
What is the difference between seconds and milliseconds?▾
Unix timestamps in seconds are 10 digits long. JavaScript and Java use milliseconds (13 digits). This tool auto-detects both formats.
Does this tool handle timezone conversion?▾
The tool displays UTC, ISO 8601, and your local timezone. All conversions happen in your browser.