Unix Timestamp Converter
Convert between Unix timestamps and human-readable date/time strings. Supports various formats and live time display.
Formatting Options
Converter
About the Unix Timestamp Converter
This tool converts Unix timestamps (also known as Epoch time) to human-readable date/time strings and vice-versa. A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970. The tool supports various predefined formats and allows for custom date-fns format strings.
Why Use This Tool?
Developers frequently encounter Unix timestamps in logs, APIs, databases, and various system interactions. This converter helps in: quickly understanding a timestamp by converting it to a familiar date format; converting a human-readable date into a timestamp for use in programs or queries; and debugging time-related issues. The live ticking clock provides a real-time reference.
Example Use Cases
- Converting a log entry's timestamp like `1678886400` to a readable date like '2023-03-15T12:00:00'.
- Taking a specific date, e.g., '01/01/2025 00:00:00', and converting it to its Unix timestamp for an API call.
- Using a custom format string like 'dd.MM.yyyy HH:mm' to parse or display dates in a specific regional format.
Pro Tips
- Seconds vs. Milliseconds: Be aware if your timestamp is in seconds or milliseconds. Check the 'Timestamp in Milliseconds' option accordingly. Many systems use seconds, but JavaScript's `Date.now()` provides milliseconds.
- Custom Formats: Utilize the custom format option with `date-fns` tokens for precise control over date/time string parsing and display. Refer to the `date-fns` documentation for all available tokens.
- Timezones: Unix timestamps are inherently UTC. When converting to a human-readable string, the display will typically be in your browser's local timezone unless a UTC-specific format (like ISO with 'Z') is chosen. When converting from a string to a timestamp, if no timezone offset is in the string, it's usually parsed as local time.