Unix Timestamp Converter
Convert Unix timestamps (epoch time) to human-readable dates — and back. Supports 21 formats including ISO 8601, MySQL DATETIME, RFC 3339, milliseconds, and regional formats. Auto-detects input format. IANA timezone support. Runs entirely in your browser.
Input
You can enter various formats such as ISO 8601, Unix timestamp, Japanese format, etc.
Output
Enter a custom format to display only that format. Example: Y-m-d H:i:s → 2026-01-16 19:11:05
Enter a date/time string to see conversion results
How to use
About this tool
Convert Unix timestamps (epoch time) and human-readable dates across 21 formats (ISO 8601, MySQL, RFC 3339, seconds/milliseconds/microseconds, regional formats, and more) in real time. Auto-detects input. IANA timezones. Runs entirely in your browser.
How to use
1. Enter a date/time in the input field in any supported form (e.g. ISO 8601, Unix seconds, MySQL DATETIME, regional formats). The format is auto-detected and shown as "Detected format". 2. Select input and output timezones (IANA, e.g. Asia/Tokyo) to see all formats in that zone. 3. Optionally set a custom format (e.g. Y-m-d H:i:s) in "Custom format" to show only that format in the result. Use the copy button next to each result to copy to the clipboard.
Options
Input: date/time string (any of 21 formats) or default Unix seconds (now). Input format is auto-detected. Input/output timezone: IANA (e.g. Asia/Tokyo, America/New_York). Date separator: - or /. Custom format: PHP-style tokens (Y=year, m=month, d=day, H/i/s=time, etc.) for custom output.
Use cases
• Interpreting log timestamps • Matching API date formats • Debugging • Multi-timezone checks
Code Examples
1<?php
2// Example: 1700000000 is Unix seconds
3echo gmdate('c', 1700000000);1// Convert Unix seconds to milliseconds
2const sec = 1700000000;
3new Date(sec * 1000).toISOString();1from datetime import datetime, timezone
2
3sec = 1700000000
4datetime.fromtimestamp(sec, tz=timezone.utc).isoformat()How it works
Conversion is done in the browser with date-fns and date-fns-tz; nothing is sent to a server. The input string is matched against 21 format patterns, parsed to a Date, then formatted with formatInTimeZone in the chosen IANA timezone. Custom format tokens (Y-m-d H:i:s style) are mapped to date-fns format strings for output. ■ Supported formats • ISO 8601: International standard. e.g. 2026-01-16T19:11:05+09:00 • ISO 9075: SQL standard date/time (DATE, TIME) • RFC 3339: Internet date-time (subset of ISO 8601). e.g. 2026-01-16T19:11:05+09:00 • RFC 7231: HTTP Cookie Expires. e.g. Wed, 21 Oct 2026 07:28:00 GMT • Unix timestamp (seconds): Seconds since 1970-01-01 00:00:00 UTC • Unix timestamp (ms): Same, in milliseconds • Unix timestamp (µs): Same, in microseconds • LDAP Timestamp: 100-nanosecond intervals since 1601-01-01 UTC (used in Active Directory, etc.) • Windows FileTime: 100-nanosecond intervals since 1601-01-01 UTC (Windows API) • Excel date/time: Serial date from 1900 epoch (decimal for time. e.g. 46038.4240) • Japanese: e.g. 2026年01月16日 19時11分05秒 • American: e.g. Jan 16, 2026 or Jan-16-2026 10:10:49 • American numeric: e.g. 1/16/2026 (month/day/year) • British: e.g. 16-01-2026 (day first) • European: e.g. 16.01.2026 • Chinese: e.g. 2026年1月16日 • JavaScript Date: Output of new Date().toString() or toISOString() • JSON: ISO 8601 string (dates in JSON are strings) • MySQL DATETIME: YYYY-MM-DD HH:MM:SS • MySQL TIMESTAMP: Same format (MySQL TIMESTAMP type) • PostgreSQL: ISO-style or YYYY-MM-DD HH:MM:SS+09
Privacy and data
All parsing and conversion is done in the browser; no input or results are sent to a server.
FAQ
- Q: What is Unix timestamp / epoch time?
- A: Unix time (epoch time) counts seconds since 1970-01-01 00:00:00 UTC (the Unix epoch). The same instant can be expressed as a Unix timestamp or as a human-readable date string; this tool converts between them.
- Q: How do I convert epoch time to a readable date in PHP, JavaScript, or Python?
- A: Use the Code examples section on this page for copy-paste snippets. In short: PHP uses gmdate()/date() on Unix seconds; JavaScript uses new Date(seconds * 1000); Python 3 uses datetime.fromtimestamp() with an explicit timezone (e.g. UTC).
- Q: What is the current Unix timestamp?
- A: It is the Unix timestamp for “now”. It changes every second. You can read the value from this tool’s input (defaults to the current time in seconds), or in code: JavaScript Math.floor(Date.now()/1000), Python int(time.time()), PHP time().
- Q: What is the Year 2038 problem?
- A: On many systems that store Unix time as a signed 32-bit integer, times after 03:14:07 UTC on 19 January 2038 can overflow. Use 64-bit timestamps or store milliseconds as needed when designing systems.
- Q: What is the difference between seconds, milliseconds, and microseconds timestamps?
- A: They are the same clock but different units. Seconds since epoch are common in APIs; JavaScript Date uses milliseconds; some systems use microseconds. This tool accepts seconds, milliseconds, and microseconds and shows the detected unit.
- Q: What date/time formats are supported?
- A: 21 formats are supported, including ISO 8601, Unix timestamp (seconds/milliseconds/microseconds), MySQL DATETIME, RFC 3339, RFC 7231, LDAP Timestamp, Windows FileTime, Excel date, JavaScript Date, and regional formats (Japanese, American, British, European, Chinese).
- Q: How does format auto-detection work?
- A: The tool matches your input string against all 21 supported format patterns automatically. The detected format is displayed as "Detected format" below the input field. You don't need to specify the input format manually.
- Q: Does this tool support timezone conversion?
- A: Yes. You can set both input and output timezones using IANA timezone names (e.g. Asia/Tokyo, America/New_York, UTC). All conversions are performed in the selected timezone.
- Q: Is any data sent to a server?
- A: No. All parsing and conversion is done entirely in your browser using date-fns and date-fns-tz. No input or results are ever sent to a server.
